“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 like async functions.” — Kesk noren
Thanks for sharing this great article on
await works with modules.