WARNING

Are you sure you want to reset the challenge? You'll lose all changes you've made to the code.

Searching Strings, Part 1

In JavaScript, strings have properties like length and methods like concat. We've now seen examples of both.

Let's look at a few more methods we can use to inspect the contents of a string. In the starter code, I've used the includes method. It does just what you'd think: it tests if the string includes or contains a "substring". Before you run the code, guess what the output will be.

Try some more examples. Make up a new text or test for different substrings. Does includes:

  • distinguish between upper and lower case?
  • work with spaces?
  • work with numbers?

Now that you know how includes works, follow the instructions in the starter code comments to pass the tests.