Javascript check if element has string as content 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
if (your_string.indexOf('hello') > -1)
{
alert("hello found inside your_string");
}