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).