how. to check fro a string in strtin in javascript code example
Example: js string contains
var string = "foo";
var substring = "oo";
console.log(string.indexOf(substring) !== -1);
var string = "foo";
var substring = "oo";
console.log(string.indexOf(substring) !== -1);