Skip to main content
1 of 2
Austin
  • 716
  • 1
  • 5
  • 7

The main practical difference is hoisting. For example:

foo(); // alerts 'hello'
function foo() {alert('hello');}

vs

foo(); // throws an error since foo is undefined
var foo = function() {alert('hello');}

Also, I think that

function foo(){
  function bar(){}
}

Is technically invalid/undefined, but all browsers support so it really doesn't matter.

Austin
  • 716
  • 1
  • 5
  • 7