The property function.length indicates the number of parameters a function expects
GIVEN we read the length from a bound function
WHEN binding a function with 3 parameters THEN the bound value has still a length of 3
WHEN binding a function (that expects three parameters) with one parameter THEN the length will reduced by 1, it will be 2
Links
The MDN docs about `length`.
The ECMAScript Language Specification, 5 Edition, Section 15.3.5.1.
Required Knowledge
- `function.bind()` (function API)
Related Katas
function API
function.length(as introduced in ES1)function.bind()function.length(with ES5 features)function.length(with ES6 features)function.name
Arrow functions
Async Function
Difficulty Level
BEGINNER
First Published
18 October 2023
Stats
2 tests to solve