Function.length and Default Parameters

Domenic Denicola domenic at
Fri Oct 12 09:42:13 PDT 2012

From: es-discuss-bounces at [es-discuss-bounces at] on behalf of Kevin Smith [khs4473 at]
Sent: Friday, October 12, 2012 12:30

> Again:
>     function f(a = 1, b, c) {}
>     f.length === 0; // Huh?

You seem to be under the mistaken impression that ES6 allows non-defaulted arguments after default ones. This is not the case. See

for a (very) recent discussion of this.

More information about the es-discuss mailing list