Skip to content

Instantly share code, notes, and snippets.

@wavded
Created December 9, 2009 20:25
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/252777 to your computer and use it in GitHub Desktop.
Save wavded/252777 to your computer and use it in GitHub Desktop.
/* in few words:no round brackets=function or object, round brackets:anything, arguments.callee included.diff is the left assignment */
var a = function(){return 1}(); // 1
var b = function(){return {}}(); //object
function(){return 1}(); //error
function(){return {}}(); //error
var c = (function(){return arguments.callee})(); //function
var d = (function(){return []})(); //array
(function(){return 1})(); // 1
(function(){return {}})(); //object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment