Function.arity
Specifies the number of arguments expected by the function.
Property of Function
Description
arity is no longer used and has been replaced by the Function.length property.
arity is external to the function, and indicates how many arguments a function expects. By contrast, Function.arguments.length provides the number of arguments
actually passed to a function.
Example
The following example demonstrates the use of arity and Function.arguments.length.
If you pass more than two arguments to this function, the function returns 0: