0Pricing
Javascript for Kids · Lesson

Comparing Things

Check if values are bigger, smaller, or equal.

Comparing Things is a free Javascript for Kids lesson on CoddyKit — lesson 3 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.

Comparing Things ⚖️

Hi, comparing champion! 🌟 Today we compare things to see what is bigger, smaller, or the same.

We use >, <, and ===! 🪄

console.log(5 > 3)

Bigger Than > 🐘

The > sign means "bigger than".

10 > 2 is true because 10 IS bigger than 2! Think of a hungry mouth eating the bigger number. 🐊

console.log(10 > 2)

Smaller Than < 🐜

The < sign means "smaller than".

2 < 10 is true because 2 IS smaller than 10! 🐜

console.log(2 < 10)

Exactly Equal === 🟰

The === (three equals) means "exactly the same".

7 === 7 is true! And 7 === 8 is false. 🎯

console.log(7 === 7)

True or False Answers 🎲

Every comparison gives you true or false!

Try a comparison that is false. 🐟

console.log(3 > 9)

Comparing in an if 🚪

We use comparisons inside if to make choices!

If the comparison is true, the door opens. 🚪

if (8 > 5) {
  console.log("8 wins! 🏆")
}

Comparing Boxes 📦

We can compare numbers saved in boxes!

Let us race two numbers. 🏁

let apples = 6
let oranges = 4
if (apples > oranges) {
  console.log("More apples! 🍎")
}

Comparing Words 🔤

We can use === to compare strings too!

"cat" === "cat" is true. "cat" === "dog" is false. 🐱🐶

console.log("cat" === "cat")

Who is Taller? 📏

Let us compare two heights to see who is taller!

The > sign helps us decide. 🦒

let me = 120
let friend = 130
if (friend > me) {
  console.log("My friend is taller! 🦒")
}

Not Equal Surprise 😮

If two things are NOT the same, === gives false.

Let us see! 🎈

console.log(5 === 10)

Your Comparing Game 🎮

Change the numbers and see if the result is true or false!

You are the judge. ⚖️

let score = 7
console.log(score > 5)
console.log(score < 5)

Quick Check ✅

Comparison question! You can do it! 🌟

Comparing Star! 🏆

Super! 🎉 Today you learned:

  • > means bigger than
  • < means smaller than
  • === means exactly the same
  • Every compare gives true or false

You are a comparing champion! ⭐

console.log("I can compare! 🎉")

Frequently asked questions

Is the “Comparing Things” lesson free?

Yes — the full text of “Comparing Things” 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 “Comparing Things”?

Check if values are bigger, smaller, or equal. 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 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Comparing Things” 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. Making a Choice with if
  2. Plan B with else
  3. Comparing Things
  4. More Choices with else if
← Back to Javascript for Kids