1function searchStringInArray (str, strArray) {
2 for (var j=0; j<strArray.length; j++) {
3 if (strArray[j].match(str)) return j;
4 }
5 return -1;
6}
7
1var myarr = ["I", "like", "turtles"];
2var arraycontainsturtles = (myarr.indexOf("turtles") > -1);