find word contains in string or not in javascript code example
Example 1: javascript string contains function
s = "Hello world";
console.log(s.includes("world"));
Example 2: js check if string contains character
"FooBar".includes("oo"); // true
"FooBar".includes("foo"); // false
"FooBar".includes("oo", 2); // false