var object = { name: function() { for(var i in object) { if(object[i] == arguments.callee.toString()) { alert(i); break; } } } }; object.name();