Function.caller : Function Object « Function « JavaScript Tutorial






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>








7.2.Function Object
7.2.1.Function() (capital F)
7.2.2.Function.apply()
7.2.3.Function.arguments
7.2.4.Function.arity
7.2.5.Function.call()
7.2.6.Function.caller
7.2.7.Function.prototype
7.2.8.Function.toSource()
7.2.9.Function.toString()