Array.prototype.findIndex(fn, startIndex = 0)

Andrea Giammarchi andrea.giammarchi at gmail.com
Thu Aug 15 21:59:54 UTC 2019


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.auburtin at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190815/6edd6bd3/attachment.html>


More information about the es-discuss mailing list