Skip to content

Instantly share code, notes, and snippets.

@stevez
Created October 23, 2011 02:46
Show Gist options
  • Select an option

  • Save stevez/1306789 to your computer and use it in GitHub Desktop.

Select an option

Save stevez/1306789 to your computer and use it in GitHub Desktop.
//call before function foo is defined
foo(); // will fail, because foo() is not defined.
var foo = function () {
alert("foo");
}
//call after function foo is defined
foo(); //=> alert("foo");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment