What is the difference between these?
var myFunc = function() {
// ...
};
vs.
var myFunc = function myFunc() {
// ...
};
In the 2nd example, arguments.callee.caller.name works, but not in the first one. Is there anything wrong with the 2nd syntax?
var func=function F(){};will makeF()available inside function block, but not outside.arguments.calleeis deprecated, so use named function expressions if you need that kind of functionality.