I believe every array iteration method that takes a callback, except for
reduce and reduceRight, take an optional receiver as the last argument (the
`this` value), so they can't be meaningfully/ergonomically extended.

On Thu, Aug 15, 2019 at 3:00 PM Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:

> isn't the second argument already reserved for the context?
>
> ```js
> [1, 2, 3].findIndex(function (i) { return i == this; }, 2);
> // 1
> ```
>
> On Thu, Aug 15, 2019 at 11:51 PM Cyril Auburtin <cyril.aubur...@gmail.com>
> wrote:
>
>> It should be possible to add a second optional argument to the `find` and
>> `findIndex` array methods, similarly to `indexOf`
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss@mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to