You want to search a string variable to determine if it contains a matching substring value.

To search for a string inside of a string contains several different methods, each offering their own benefit. The most common solutions involve the indexOf function or using a regular expression with the match function.