function myname()
{
Console.log(arguments.callee.toString().match(/function ([^\(]+)/)[1]);
}
this print myname in console. but I have to print this
myname: function() {
Console.log(arguments.callee.toString().match(/function ([^\(]+)/)[1]);
}
which is throwing an error. Is there a way to print myname from problem defined above. I have to call it from inside only.