Let's say I have an obj:
var app = {}
and a method inside the object
app = {
init: function () {
}
}
how would I go about obtaining the method name 'init' inside of init() without specifically looking for 'init'. This would be in the case that the method name could be anything and I can't rely on searching for a specific name.
app = {
init: function () {
//get 'init' method name here
}
}
app.init();
I tried using callee but that brings back an empty string