Skip to content

Instantly share code, notes, and snippets.

@wavded
Created December 10, 2009 16:12
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 wavded/253421 to your computer and use it in GitHub Desktop.
Save wavded/253421 to your computer and use it in GitHub Desktop.
var a = {};
//to note: nothing is passed in and no private variables/functions/etc. on purpose
var b = (function(){
return {};
})();
/*
Is there any difference between a and b in regards to scope/execution? Any advantage one has over the other? (besides like arguments.callee/recursive stuff);
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment