// Create a string variable
// Use indexOf() to search string
// Output results
What if we are searching for something that does not get found? If this occurs, the indexOf() method returns ‘-1’.
So what can we do with this? Well, we can incorporate the indexOf() method call into an ‘IF’ statement. If it returns ‘-1’, then we can tell the end user that the content is not found.