JavaScript Professional — Medium
Key points
- IIFE executes immediately after being defined
- Prevents global variable pollution
- Creates a local scope for variables
- Avoids variable name collisions in shared global namespace
Ready to go further?
Related questions
