Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 863 Bytes

File metadata and controls

10 lines (8 loc) · 863 Bytes

Bookmarks tagged [top-level-await]

https://javascript.plainenglish.io/javascript-top-level-await-in-a-nutshell-4e352b3fc8c8

Previously, in order to use await, code needed to be inside a function marked as async. This meant that you couldn’t use await outside any function notation. Top-level await enables modules to act…