Flip Many Times
Count heads and tails.
Flip, Flip, Flip! 🪙
Hello again, coin champion! 🪙 Today we flip the coin MANY times!
And we will count how many Heads and how many Tails we get. 🔢 Let's see if it is fair!
A Counting Box 📦
To count, we need boxes to keep our score! 📦
We make heads start at 0 and tails start at 0. Then we add 1 each time. ➕
let heads = 0;
let tails = 0;
console.log('Heads so far: ' + heads);
console.log('Tails so far: ' + tails);All lessons in this course
- Heads or Tails
- Guessing
- Checking the Guess
- Flip Many Times