Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hshoff
Created November 20, 2012 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hshoff/4121239 to your computer and use it in GitHub Desktop.
Save hshoff/4121239 to your computer and use it in GitHub Desktop.
// it invokes module1
(function(){ console.log('module1'); return function(){ console.log(arguments); };}())
// => module1
//it invokes module2
(function(){ console.log('module2'); }());
// => module2
// equivalent
(function(){ console.log(arguments); })(undefined)
// => [undefined]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment