ECMAScript 2022 (ES13) toplevel await ¶
We can now use await at the top levels of modules and don’t have to enter async functions or methods anymore:
// my-module.mjs
const response = await fetch('https://example.com');
const text = await response.text();
console.log(text);