DEV Community

Discussion on: What is the significance of, and reason for, wrapping the entire content of a JavaScript source file in a function block?

Collapse
 
taufik_nurrohman profile image
Taufik Nurrohman • Edited

The most useful thing about IIFE is variable minification. Minification tools won’t touch global variable names so it is impossible to minify global variables.