Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Created December 31, 2013 10:35
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 jackfranklin/8195073 to your computer and use it in GitHub Desktop.
Save jackfranklin/8195073 to your computer and use it in GitHub Desktop.
var foo = function() {
return 2;
}
var x = foo;
var y = foo();
// now x is a reference to the foo function
// whereas with y we called (or "invoked") foo, meaning y is set to foo's return value, 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment