Created
June 19, 2011 12:20
-
-
Save jamischarles/1034222 to your computer and use it in GitHub Desktop.
Self invoking anonymous function
This file contains 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
//of this will execute privately without exposing the variables to the global object and without polluting the global namespace. | |
(function(){ | |
console.log("runs"); | |
function test(){ | |
//console | |
console.log("test"); | |
} | |
test(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment