Immediately invoked function expression: Difference between revisions

Content deleted Content added
Change "var" to "let" in JavaScript snippets
getValue becomes a variable (not a function) when it is assigned by a IIFE
Line 68:
v = 2;
 
getValue(); // 1
</syntaxhighlight>
 
Line 81:
v = 2;
 
getValue(); // 1
</syntaxhighlight>