function main() { Hello(); } function Hello() { // How do you find out the caller function is \'main\'? }
Is there a way to find out the call
It's safer to use *arguments.callee.caller since arguments.caller is deprecated...
*arguments.callee.caller
arguments.caller