| caller The caller property of the arguments object is used as the container for the arguments object of the calling function. If the function wasn't executed from another function, the value stored in this property is NULL. syntax: arguments.caller EXAMPLE function argumentLength() { argumentsLengthString += arguments.caller.length; return argumentsLengthString; } function giveArguments() { var localVariableOne = arguments[0].value; localVariableOne = "ArgumentOne"; localVariableOne += arguments[1]; document.write("The number of arguments passed is : " + localVariableOne); argumentLength(); } The example shows two functions, argumentLength() and giveArguments(). The giveArguments() function passes two arguments to the argumentLength() function, which then displays the number of arguments that were passed. |