strpos js code example
Example 1: js strpos
var str = "Hello world, welcome to the universe.";
var n = str.indexOf("welcome");
Example 2: indexof javascript
Array.indexOf(searchElement, fromIndex)
Example 3: .index of javascript
let monTableau = ['un', 'deux','trois', 'quatre'] ;
console.log(monTableau.indexOf('trois')) ;
Example 4: indexof javascript
arr.indexOf(searchElement[, fromIndex])