0Pricing
Javascript for Kids · Lesson

The Rules

How to play.

The Rules is a free Javascript for Kids lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Javascript for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Welcome to the Game! 🎮

Get ready for Rock, Paper, Scissors! ✊📄✂️

It is a super fun game where two players each pick one thing. Then we see who wins!

Let's learn the rules together! 🚀

The Three Choices ✋

There are only three things you can pick:

  • Rock
  • 📄 Paper
  • ✂️ Scissors

That's it! Easy peasy. 😄

console.log('Rock ✊')
console.log('Paper 📄')
console.log('Scissors ✂️')

Rock Smashes Scissors ✊

Rock beats Scissors! 💥

Think about it: a big heavy rock crushes the little scissors. Crunch! 🪨

console.log('Rock ✊ smashes Scissors ✂️')
console.log('Rock wins! 🏆')

Paper Covers Rock 📄

Paper beats Rock! 🎉

The paper wraps all around the rock and covers it up. The rock can't move! 😮

console.log('Paper 📄 covers Rock ✊')
console.log('Paper wins! 🏆')

Scissors Cut Paper ✂️

Scissors beats Paper! ✨

Snip snip! The scissors cut the paper into pieces. 📄➡️🎊

console.log('Scissors ✂️ cut Paper 📄')
console.log('Scissors win! 🏆')

Storing a Choice 📦

In code, we can save a pick in a variable. A variable is like a labeled box. 📦

Here we put 'rock' inside a box called myPick.

let myPick = 'rock'
console.log('I picked: ' + myPick + ' ✊')

Both Players Pick 👥

The game needs two picks. One for you and one for the other player!

Let's store both in two boxes. 📦📦

let you = 'paper'
let friend = 'rock'
console.log('You: ' + you + ' 📄')
console.log('Friend: ' + friend + ' ✊')

What is a Tie? 🤝

What if you BOTH pick the same thing? Like both pick Rock? ✊✊

That's a tie! Nobody wins. You just play again. 🔁

let you = 'rock'
let friend = 'rock'
console.log('Both picked rock ✊✊')
console.log('It is a tie! 🤝')

Checking for a Tie 🔍

We can use if to check things. If both picks are the same, it's a tie!

=== means "is the same as". 🟰

let you = 'paper'
let friend = 'paper'
if (you === friend) {
  console.log('Tie! 🤝')
}

The Winning Circle 🔄

Here is the secret circle: ✊➡️✂️➡️📄➡️✊

  • Rock beats Scissors
  • Scissors beats Paper
  • Paper beats Rock

Each one beats one and loses to one! 🌀

console.log('Rock ✊ > Scissors ✂️')
console.log('Scissors ✂️ > Paper 📄')
console.log('Paper 📄 > Rock ✊')

You Know the Rules! 🌟

Awesome! Now you know all the rules:

  • Pick rock, paper, or scissors ✊📄✂️
  • Same pick = tie 🤝
  • Each beats one and loses to one 🔄

Next we'll make the computer pick! 🤖

console.log('Rules learned! ✅')
console.log('Ready to play! 🎮')

Quick Check 🧠

Time for a brain question! 🤔

Great Job! 🎉

You learned the rules of Rock, Paper, Scissors! 🥳

  • Three picks: ✊📄✂️
  • Same pick = tie 🤝
  • Rock beats Scissors, Scissors beats Paper, Paper beats Rock 🔄

Next up: making the computer pick a move! 🤖

console.log('Lesson done! ⭐')
console.log('See you next time! 👋')

Frequently asked questions

Is the “The Rules” lesson free?

Yes — the full text of “The Rules” is free to read here on the web, and the Javascript for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Javascript for Kids course, upgrade to CoddyKit PRO.

What will I learn in “The Rules”?

How to play. You practise Javascript for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Javascript for Kids?

No prior experience is required. Javascript for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “The Rules” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Javascript for Kids lesson?

Yes. Every Javascript for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. The Rules
  2. Computer Picks
  3. Who Wins?
  4. Play Again
← Back to Javascript for Kids