DEV Community

loading...

Discussion on: Explain IIFE(Immediately Invoke Function Expression) Like I'm Five

Collapse
adam_cyclones profile image
Adam Crockett

It's not wired at all, as your tweet asks. It's just a workaround until top-level await comes in circa 2020. In the mean time I always include a semicolon Infront so the interpreter doesn't think that any preceding thing is a function call. You should do the same. 👽

Thread Thread
codefinity profile image
Manav Misra

Tx. 'weird' not 'wired' 👆🏽;)

Thread Thread
adam_cyclones profile image
Adam Crockett

I use a phone exclusively on Dev.to