JavaScript lastIndexOf

The JavaScript lastIndexOf method is useful to return the index position of the last occurrence of a specified string. It will return -1 if the specified string is not found. The syntax of the JavaScript lastIndexOf function is String_Object.LastIndexOf(Substring, Starting_Position) If we specify the Negative number as Starting_Position, the LastIndexOf will start looking from Zero. When … Read more