JavaScript indexOf

The JavaScript indexof method returns the index position of the first occurrence of a specified string. If the specified string is not found, the indexof function will return -1. The syntax of the JavaScript indexof function is String_Object.indexof(Substring, Starting_Position) If the Starting_Position is a Negative number, the indexof starts looking from 0. If the Starting_Position … Read more