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

    Type Parameters

    • T

    Parameters

    • array: T[]

      The array to inspect.

    • value: T

      The value to search for.

    Returns number

    Returns the index of the matched value, else -1.

    5.11.0

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