sortedLastIndexOf

Array
since 4.0.0

Arguments

  • Array The array to inspect.
  • * The value to search for.

Returns

number the index of the matched value, else `-1`.

This method is like _.lastIndexOf except that it performs a binary search on a sorted array.

Example of Lodash _.sortedLastIndexOf

_.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
// => 3