No, there is nothing like that in Javascript. This function is anonymous, therefore it does not have a name, and what you want is ambiguous, because the function can just as easily have any number of variables referring to it:
var a, b, c, d; a = b = function(){ console.log(this.name); }; c = b; d = c; a = b = 5;
What are you really trying to achieve? I am sure there is another way to achieve this.
Paulpro
source share