Function.caller : Function Object : Function JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Function » Function Object »

 

Function.caller







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>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Function
» Function Object