Re:Modern Javascript: Everything you missed over the last 10...
by dclowd9901 on Saturday May 15, 2021 @03:19PM
(#27168045)
I don't know what the REPL you're running does with top level functions, but my guess is that an `await` needs to run within a function that is declared `async`. The reason (if so) would be that then babel could then transpile the function appropriately into a Promisory function. At the top level, what function would be translated?
[ Parent
| on HN ]
There are no comments on this comment yet.