News for hackers. Stuff that matters.
Re:Modern Javascript: Everything you missed over the last 10... by mweberxyz on Saturday May 15, 2021 @03:35PM (#27168202)
Top-level await is very, very new and requires ES modules -- you can only use this feature without warnings recently in Node 15. For the foreseeable future, the final line should be replaced with:

    withAsync()
       .then(() => print("done")
       .catch((err) => console.error(err);
Re:Modern Javascript: Everything you missed over the last 10... by sandrot on Saturday May 15, 2021 @04:54PM (#27168926)
You're right, thank you for the explanation. My REPL runs the code in the textarea in an anonymous Async function, which is why top level async works in my examples.