We have two different way for doing function expression in JavaScript:
Named function expression (NFE):
var boo = function boo () {
alert(1);
};
Anonymous function expression:
var boo = function () {
alert(1);
};
And both of them can be called with boo();
. I really can't see why/when I should use anonymous functions and when I should use Named Function Expressions. What difference is there between them?