Skip to content

Instantly share code, notes, and snippets.

@hshoff
Created November 20, 2012 21:21
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/4121235 to your computer and use it in GitHub Desktop.
Save hshoff/4121235 to your computer and use it in GitHub Desktop.
// new crockford module1.js
(function(){
console.log('module1');
// return a function that logs it's
// arguments when invoked
return function(){
console.log(arguments);
};
}())
// new production.js
// unminified problem for readability
(function(){
console.log('module1');
// return a function that logs it's
// arguments when invoked
return function(){
console.log(arguments);
};
}())(function(){
console.log('module2');
}());
// => module1
// => module2
// => [undefined]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment