I would like the following if statement to alert \'yes\' if \'featured\' is in array, regardless of whether it is uppercase or lowercase.
if
I\'m also not
No, I don't think so.
This is how I would to it, using ($.each and match()):
$.each
match()
var myArray = ["featured", "foo", "bar"]; $.each(myArray,function(index,value){ if(value.match(/featured/i) !== null){ alert("Yes!"); return false; } });
on JSFIDDLE: http://jsfiddle.net/QGtZU/