Created
January 30, 2018 10:07
-
-
Save haingdc/0e685d41edebeb7ff6681832bb2f35f2 to your computer and use it in GitHub Desktop.
iife example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = 2; | |
(function foo(){ | |
var a = 3; | |
console.log( a ); // 3 | |
})(); | |
console.log( a ); // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment