I want to get current method name directly from this method body, my code which does not work is:
var myFunction = function(){
console.log(arguments.callee.name); // output must be "myFunction"
}
This works excellently
function myFunction() {
console.log(arguments.callee.name); // output is "myFunction"
}
what do you suggest me, is there any way to make this work? I searched for google more and more but did not find smth. helpful