A Lucky Number Game
Build a tiny game of chance.
A Lucky Game! 🍀
Let us build a tiny game of chance! 🎰
The computer picks a lucky number. Did you win? 🎉
The Lucky Number 🎲
First, the computer picks a secret lucky number from 1 to 6. 🍀
let lucky = Math.floor(Math.random() * 6) + 1;
console.log("Lucky number chosen!");All lessons in this course
- Making Random Numbers
- Rolling a Dice
- Picking a Random Item
- A Lucky Number Game