Created
May 31, 2013 01:14
-
-
Save sean-roberts/5682406 to your computer and use it in GitHub Desktop.
Safe self invoking function wrapper! Suuhhweet! This is actually a way to create a type of Namespace in Javascript
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
//version without passing in parameters that are not available in the function scope | |
;(function(){ | |
//code here | |
//why the leading semi colon? | |
// this is a safe way to keep from having conflicts with other code that uses the same | |
// self invoking functions but left off the colon | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment