The both of the statements declares a function object. A difference can be on the point that the object is initialized. Consider the following code:
f1();
f2();
function f1() {}
var f2 = function() {};
var f3 = function() {};
f3();
If you run the code above, you will see that the call of f1
is valid while f2
is undefined
at the point we try to call it (before its declaration). The call to f3
is valid, since it's after its declaration.