String.lastIndexOf

Number lastIndexOf (String searchValue, Number offset)

Parameters

searchValue The string for which to search.
offset The starting offset of the search.

Description

Returns the index within the string of the last occurrence of the specified value.

The string is searched backward, starting at fromIndex. Returns the index within the string where the last occurrence of searchValue was found, or -1 if it was not found.