re: ELI5: Why use a function declaration, expression, or an IIFE in JavaScript? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The one place where IIFEs can still be useful is surprisingly async/await in Node. You can't use await outside of async so you end up doing someth...
 

Oh, yeah. How could I forget about that?

Also, just a side note, I just realized now that top-level await is essentially a glorified way of writing top-level synchronous code. That's kind of strange... 🤔

code of conduct - report abuse