Claude Pache (2014-02-18T20:42:14.000Z)
Le 17 févr. 2014 à 22:32, C. Scott Ananian <ecmascript at cscott.net> a écrit :

> 
> Allen: I can volunteer to offload some of the work of auditing for
> similar cases with default arguments.  From a quick read-through, only
> `Array#fill` seems to have the same issue.  `Array#lastIndexOf` is
> written in the ES5 style, where we look at `arguments.length` instead
> of using default parameters in the signature.  But it does use
> `ToLength(this.length) - 1` as a default value; I think that could be
> changed to `ToInteger(this.length) - 1` for consistency without
> affecting actual behavior.

There is also `Array#slice`, which uses `ToLength(this.length)` as default for its second argument (even if its length is 2).

—Claude
domenic at domenicdenicola.com (2014-02-21T20:19:53.876Z)
Le 17 févr. 2014 à 22:32, C. Scott Ananian <ecmascript at cscott.net> a écrit :

> 
> Allen: I can volunteer to offload some of the work of auditing for
> similar cases with default arguments.  From a quick read-through, only
> `Array#fill` seems to have the same issue.  `Array#lastIndexOf` is
> written in the ES5 style, where we look at `arguments.length` instead
> of using default parameters in the signature.  But it does use
> `ToLength(this.length) - 1` as a default value; I think that could be
> changed to `ToInteger(this.length) - 1` for consistency without
> affecting actual behavior.

There is also `Array#slice`, which uses `ToLength(this.length)` as default for its second argument (even if its length is 2).