Created
January 13, 2012 12:09
-
-
Save FiNGAHOLiC/1605795 to your computer and use it in GitHub Desktop.
Immediately invoked function expressions
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
// http://speakerdeck.com/u/addyosmani/p/large-scale-javascript-application-architecture | |
(function(){ | |
// code to be immediately invoked | |
}()); // Crockford recommend this way | |
(function(){ | |
// code to be immediately invoked | |
})(); // This is just as valid | |
(function(window, document, undefined){ | |
// code to be immediately invoked | |
})(this, this.document); | |
(function(global, undefined){ | |
// code to be immediately invoked | |
})(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment