Checking Guesses
Compare answers.
Did They Guess Right? 🤔
The player typed a guess. Now the computer must compare it to the secret animal. Let us learn how! 🔍
Comparing Two Words ⚖️
We use === (three equals) to ask "are these the same?". It gives back true or false.
console.log("cat" === "cat")
console.log("cat" === "dog")All lessons in this course
- A List of Animals
- Giving Clues
- Checking Guesses
- You Got It!