Array.prototype.findLastIndex()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since August 2022.

The findLastIndex() method of Array instances iterates the array in reverse order and returns the index of the first element that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned.

See also the findLast() method, which returns the value of last element that satisfies the testing function (rather than its index).