check if var contains char javascript code example
Example: js check if string contains character
if (your_string.indexOf('hello') > -1)
{
alert("hello found inside your_string");
}
if (your_string.indexOf('hello') > -1)
{
alert("hello found inside your_string");
}