method Array.lastIndexOf
Private
Array.lastIndexOf(
searchElement: T,
fromIndex?: number,
): number

Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

Parameters

searchElement: T

The value to locate in the array.

optional
fromIndex: number

The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.

Return Type

number