0Pricing
Javascript for Kids · Lesson

Rolling a Die

Random 1 to 6.

Let's Roll Some Dice! 🎲

Welcome to the Roll the Dice game! 🎲

A dice (or "die") has six sides with numbers 1 to 6. We're going to roll one with code! 🎉

console.log('Rolling the dice! 🎲')
console.log('Numbers 1 to 6! 🔢')

The Six Faces 🎲

A die has six faces:

  • ⚀ one
  • ⚁ two
  • ⚂ three
  • ⚃ four
  • ⚄ five
  • ⚅ six

When we roll, we get one of these! 🎯

console.log('A die has 6 sides ⚀⚁⚂⚃⚄⚅')

All lessons in this course

  1. Rolling a Die
  2. Two Dice
  3. Tracking Dice Points
  4. First to Twenty
← Back to Javascript for Kids