Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The length data property of a Function instance indicates the number of parameters expected by the function.
A number.
| Writable | no |
| Enumerable | no |
| Configurable | yes |
A Function object's length property indicates how many arguments the function expects, i.e., the number of formal parameters:
By contrast, arguments.length is local to a function and provides the number of arguments actually passed to the function.
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.
| ECMAScript® 2027 Language Specification # sec-function-instances-length |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 10, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.