The await keyword previously couldn’t be used outside the async box (or function) With ES2022, we can use await without async, for example, to load other code conditionally or dynamically. ‘.at()’ method for arrays will help you get what you want in a line of code.
Table of contents
4 Best New JavaScript ES2022 Features1. Await can be used outside of async blocks2. ‘.at()’ method for arrays3. ‘cause’ for Errors4. RegExp match expression7 Comments
Sort: