0Pricing
Javascript for Kids · Lesson

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

  1. A List of Animals
  2. Giving Clues
  3. Checking Guesses
  4. You Got It!
← Back to Javascript for Kids