Function.arguments.length

Function.arguments.length

Specifies the number of arguments passed to the function.
Property of Function.arguments local variable; Function (deprecated)

Description

arguments.length is a property of the Function.arguments local variable available within all function objects; arguments.length as a property of Function is no longer used.

arguments.length provides the number of arguments actually passed to a function. By contrast, the Function.length property indicates how many arguments a function expects.

Example

The following example demonstrates the use of Function.length and arguments.length.

If you pass more than two arguments to this function, the function returns 0:

See also

Function.arguments

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.