We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

length Property (arguments)

Updated: July 2009

Returns the actual number of arguments passed to a function by the caller.



Optional. The name of the currently executing Function object.

The length property of the arguments object is initialized by the scripting engine to the actual number of arguments passed to a Function object when execution begins in that function.


The arguments object is not available when a program is running in fast mode, the default for JScript. To compile a program that uses the arguments object from a command prompt, you must turn off the fast option by using /fast-. It is not safe to turn off the fast option in ASP.NET because of threading issues. For more information, see arguments Object.

The following example illustrates the use of the length property of the arguments object.

function ArgTest(a, b)
    print ("Expected Arguments: " + ArgTest.length);
    print ("Passed Arguments: " + arguments.length);
    var s = "The individual arguments are: "
    for (var n = 0; n < arguments.length; n++)
       s += ArgTest.arguments[n];
       s += " ";
    print (s);




July 2009

Modified example.

Content bug fix.

July 2009

Modified note about the /fast option.

Content bug fix.

March 2009

Modified example and added information about the /fast option.

Information enhancement.