Searching for multiple words within a string or Array
How would one search for more than one one simultaneously?
I have this function:
var flix = ["Any items left unattended on this table" , "Hello, World"];
var a = flix.toLowerCase();
var b = s.toLowerCase();
var result = a.indexOf(b)
if (result >= 0)
It's pretty basic, it just searches through the first index of var flix and tells me if the parameter (s) is 'found' or 'not found'. I made it not to be case sensitive.
However, how would I search for multiple words for example:
Multiwords("ANY items This")
and if any combination of 'ANY' or 'items' or 'This' is found, i still get my alert message of 'Found'?