Returns the number of parameters defined by the function.
functionName.length
The required functionname parameter is the name of the function being discussed.
Description
The length property of a function is initialized by the scripting engine when the function instance is created, and the value is the number of parameters in the function definition.
If the number of parameters is different from the value of the length property when the function is invoked, then the situation that occurs will depend on the function itself.
The following example illustrates the use of the length property:
ArgTest.length; if (expargs < 2) s += expargs + " argument. "; else s += expargs + " arguments. "; if (numargs < 2) s += numargs + " was passed."; else s += numargs + " were passed."; return(s);}
Requirements
Version 2
Please see
Arguments Properties | Length Property (Array) | Length Property (String)
Apply to: Function Object