Skip to content

Instantly share code, notes, and snippets.

@Reinmar
Created August 7, 2011 20:41
Show Gist options
  • Save Reinmar/1130767 to your computer and use it in GitHub Desktop.
Save Reinmar/1130767 to your computer and use it in GitHub Desktop.
Function expression vs Function declaration
a(); // -> ? :)
var a = function () {
console.log('a1');
};
function a() {
console.log('a2');
}
a(); // -> ? :)
function b() {
console.log('b1');
}
function b() {
console.log('b2');
}
b(); // -> 'b2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment