JavaScript String indexOf

JavaScript String indexOf


JavaScript String indexOf() method
In this Tutorial, we will learn about JavaScript String indexOf() method with the help of following below:
The indexOf() method will return the position of the first occurrence of the specified string.
Syntax
var index = str.indexOf(“string”);
Example
Output