I am trying to compare words in strings. This is what i want to do:
var string1 = "Action, Adventure, Comedy";
var string2 = "Action Horror";
if (string1 have a word from string 2 == true)
{
alert("found!");
}
I have tried match() but in my situation, it tries to find "Action Horror" instead of "Action" and "Horror" words.