var xello = function ()
alert("CALL FROM: " + arguments.callee.caller.toString());
it will print out the last self executed function.
if you call xello() directly (without the self executing function), the caller is null, you will get null point exception. because xello is get called from global scope.
so the better code is:
myFunc caller myFunc caller
"If the function
fwas invoked by the top level code, the value of
null, otherwise it's the function that called