Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:Function:arity

From MDC

Deprecated

Contents

[edit] Summary

Specifies the number of arguments expected by the function.

Property of Function
Implemented in: JavaScript 1.2, NES 3.0

JavaScript 1.4: Deprecated.

[edit] Description

arity is no longer used and has been replaced by the length property.

arity is external to the function, and indicates how many arguments a function expects. By contrast, arguments.length provides the number of arguments actually passed to a function.

[edit] Examples

[edit] Example: Using arity

See example in Function.length

[edit] See Also

arguments.length, Function.length