Skip to content

Instantly share code, notes, and snippets.

@jakearchibald
Created March 3, 2010 14:50
Show Gist options
  • Select an option

  • Save jakearchibald/320656 to your computer and use it in GitHub Desktop.

Select an option

Save jakearchibald/320656 to your computer and use it in GitHub Desktop.
// this code doesn't work as expected in firebug, due to the way it eval's code
// (showing that http://www.slideshare.net/douglascrockford/crockford-on-javascript-act-iii-function-the-ultimate/9 isn't quite true)
foo(); // hello
function foo() {
alert('hello');
}
bar(); // error 'bar is not a function'
var bar = undefined;
bar = function bar() {
alert('hello');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment