Skip to content

Instantly share code, notes, and snippets.

@workmajj
Created June 1, 2012 21:31
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 workmajj/2855245 to your computer and use it in GitHub Desktop.
Save workmajj/2855245 to your computer and use it in GitHub Desktop.
Fun with JS scope and first-class functions.
> var foo = function() { return foo; }
undefined
> foo
function () { return foo; }
> foo()
function () { return foo; }
> foo()() === foo()()()()()()()()
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment