Function.length (Property)

The number of arguments expected by a function call.


ECMAScript edition - 2
JavaScript - 1.1
JScript - 1.0
Internet Explorer - 3.02
Netscape - 4.0
Property/method value type:Number primitive
JavaScript syntax:-myFunction.length

This property yields a numeric value representing the number of arguments the function expects to be called with and can support.

The length property of the Function constructor returns 1 but it accepts a variable number of arguments.

Otherwise the length property returns a value that is typical for the function. Because the number of arguments can often be variable, this typical value should be used with caution.

This value is not necessarily the same as the length of the arguments array that is available inside the function when it is called. This indicates the actual number of arguments that were passed.


See also:Arguments.length, Function call, Function object, Function.arity, Function.prototype

Property attributes:

ReadOnly, DontDelete, DontEnum


ECMA 262 edition 2 - section -

ECMA 262 edition 2 - section -

ECMA 262 edition 3 - section -