The name of the function is an indisputable property of this function defined in the expression of the initial function.
var notTheName = function thisIsTheName() { ... } someObj.stillNotTheName = function stillTheName() { ... }
If a function expression has no name, there is (not surprisingly) a lack of a way to identify it by name. Assigning a function to a variable does not give it a name; If so, you cannot determine the name of the expression assigned to multiple variables.
You must set the firstFunction name property, expressing it as
firstFunction: function firstFunction(){ this.secondFunction(); }
In addition, arguments.callee deprecated. See Why is the arguments.callee.caller property deprecated in JavaScript? for a very good explanation of the history of arguments.callee .
source share