0Pricing
Javascript for Kids · Lesson

Guessing

Let the player guess.

Time to Guess! 🤔

Welcome back, coin master! 🪙 Now we will let a player guess before the flip!

This is what makes it a real game. You guess, the coin flips, and we see if you were right! 🎉

A Guess is a Choice 🎯

The player can only pick one of two things: Heads or Tails. 🎯

Let's save the player's guess in a box (variable) called guess. 📦

let guess = 'Heads';
console.log('The player guessed: ' + guess);

All lessons in this course

  1. Heads or Tails
  2. Guessing
  3. Checking the Guess
  4. Flip Many Times
← Back to Javascript for Kids