string include text javascript code example
Example 1: How find a specific character in js
var word = "This is how you locate a word in a string";
var n = word.includes("word");
Example 2: js check if string contains character
"FooBar".includes("oo"); // true
"FooBar".includes("foo"); // false
"FooBar".includes("oo", 2); // false