This method is like _.lastIndexOf except that it performs a binary search on a sorted array.
_.lastIndexOf
array
The array to search.
The value to search for.
Returns the index of the matched value, else -1.
-1
_.sortedLastIndexOf([1, 1, 2, 2], 2);// => 3 Copy
_.sortedLastIndexOf([1, 1, 2, 2], 2);// => 3
This method is like
_.lastIndexOf
except that it performs a binary search on a sortedarray
.