jquery check if string includes code example
Example 1: if str contains jquery
if (str.indexOf("Yes") >= 0)
//case insensitive version
if (str.toLowerCase().indexOf("yes") >= 0)
Example 2: string contains in javascript
const string = "foo";
const substring = "oo";
console.log(string.includes(substring));