Ask coding questions

← Back to all posts
IFFE In Libraries
Coding1000 (6)

In frameworks like React, GSAP, and Typescript why do they start with an iffe function?

Commentshotnewtop
malvoliothegood (430)

So that the code runs immediately the code loads. Also variables within an iffe are hidden from the global scope by default.