The caller property is used to reference the function that called the currently executing function.
<html> <body> <script lanuguage="JavaScript1.1"> <!-- function functionB(){ var Boss = true; functionA(); } function functionA(){ myBoss = functionA.caller.name; document.write(myBoss + "<br>"); } functionB(); --> </script> </body> </html>