Skip to content

Instantly share code, notes, and snippets.

@jgorset
Created May 14, 2013 17:47
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 jgorset/5577967 to your computer and use it in GitHub Desktop.
Save jgorset/5577967 to your computer and use it in GitHub Desktop.
foo(); // Logs "foo".
function foo() { console.log("foo") }
foo(); // Raises "ReferenceError: foo is not defined".
foo = function() { console.log("foo") }
foo(); // Raises "TypeError: undefined is not a function".
var foo = function() { console.log("foo") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment