Hoisting

All functions are hoisted to the top of the script

// Hoisted

function foo() {

}

All function expressions are not

// Not Hoisted

var foo = function foo() {

}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License