Java String FAQ: How can I tell if a Java String contains a given regular expression (regex) pattern? To test if the string paragraph contains the string word (thanks @QuarterMeister). 2. My method is better, because it will work even if the array contains null, undefined, or other non-strings.
var b = "APPLE";