Function.length and Default Parameters

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


From: es-discuss-bounces at mozilla.org [es-discuss-bounces at mozilla.org] on behalf of Kevin Smith [khs4473 at gmail.com]
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

https://mail.mozilla.org/pipermail/es-discuss/2012-October/025704.html

for a (very) recent discussion of this.



More information about the es-discuss mailing list