On Thursday, October 11, 2012 at 11:25 PM, Kevin Smith wrote:

>  
> > And specifically not stopping counting at the first parameter with a 
> > default value, right?
>  
> Yep.  Would it also work for this use case to stop counting at the first 
> parameter with no default value, after which there are only defaults?  
>  
>     function f(a, b = 2, c, d = 4, ...rest) {}
>     f.length === 3;
>  
> Probably? Not sure...

Neither am I...

This looks like the sort of thing that will get labeled "uselessly unreliable", 
then again I was in favor of making length equal the number of formal 
parameters—rest included.

Rick  
>  
> Kevin  
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>  
>  


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to