find a letter in a string javascript code example
Example 1: how to identify specific letter from a string in javascript
var str = "Hello world, welcome to the universe.";
var n = str.includes("world", 12);
Example 2: indexof javascript
var colors=["red","green","blue"];
var pos=colors.indexOf("blue");
var str = "We got a poop cleanup on isle 4.";
var strPos = str.indexOf("poop");
<Checkbox
checked={value.indexOf(option) > -1}
value={option}
/>
Example 3: indexof javascript
Array.indexOf(searchElement, fromIndex)