Skip to main content
Version: 3.13.0

Function.prototype.length

The length data property of a Function instance indicates the number of parameters expected by the function.

Value

A number.

Description

A Function object's length property indicates how many arguments the function expects, i.e. the number of formal parameters.

The Function constructor is itself a Function object. Its length data property has a value of 1.

Due to historical reasons, Function.prototype is a callable itself. The length property of Function.prototype has a value of 0.