Array.prototype.findIndex(fn, startIndex = 0)
# Andrea Giammarchi (5 years ago)
isn't the second argument already reserved for the context?
[1, 2, 3].findIndex(function (i) { return i == this; }, 2);
// 1
# Jordan Harband (5 years ago)
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.
It should be possible to add a second optional argument to the
find
andfindIndex
array methods, similarly toindexOf