Many developers utilized as an alternative IIFE (Immediately Invoked Function Expression) as a way to get access to the feature. When the async/await feature was first introduced, attempting to use an await outside of an async function resulted in a Syntaćrror. Now the await can be used at the top level of a module and can be super handy when initializing imports and creating fallbacks. ![]() This was fine until it wasn't, like when we hit the top level of our module and could not use the await keyword. Until this point, we could only use await in the scope of async functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |