JavaScript indexOf

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) Substring: String you want to search inside the string_Object. Starting_Position or fromindex (optional): If you want … Read more