0Pricing
Javascript for Kids · Lesson

Asking Yes or No Questions

Turn comparisons into true or false.

Asking Yes or No Questions 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.

Ask the Computer! 🙋

We can ask the computer yes-or-no questions! 🤖

It answers with true or false. Cool, right? 😎

Is It Equal? 🟰

We use === to ask "are these the same?" 🤔

console.log(5 === 5);
console.log(5 === 8);

Triple Equals Magic ✨

One = puts something in a box. 📦

Three === ask a question! Do not mix them up! 😄

Bigger or Smaller? 📏

> asks "is the first bigger?" and < asks "is it smaller?" 📐

console.log(10 > 3);
console.log(2 < 1);

Not Equal? 🚫

!== asks "are these DIFFERENT?" 🙅

console.log(7 !== 4);
console.log(7 !== 7);

Big or Same 📊

>= means "bigger OR equal". <= means "smaller OR equal". 🎚️

console.log(5 >= 5);
console.log(3 <= 2);

Comparing Words Too 🔤

We can even compare words! Are they the exact same? 🔍

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

Save the Answer 📦

The yes/no answer can go in a box, just like before! 🎁

let bigEnough = 12 > 10;
console.log(bigEnough);

Questions in a Game 🎮

Did the player score enough points to win? Let us ask! 🏆

let score = 95;
console.log(score >= 90);

All the Question Marks ❓

  • === same?
  • !== different?
  • > bigger?
  • < smaller?

You Asked Great Questions! 🎉

Wonderful! Comparisons give you true or false answers. ✅❌

Now your code can think for itself!

Quick Check 🧠

Question time! 🎯

Question Master! 🏆

Yay! You can ask the computer questions now. ❓

Next, we build a real quiz checker! So fun! 🚀

Frequently asked questions

Is the “Asking Yes or No Questions” lesson free?

Yes — the full text of “Asking Yes or No Questions” 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 “Asking Yes or No Questions”?

Turn comparisons into true or false. 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 “Asking Yes or No Questions” 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. True and False
  2. And, Or, Not
  3. Asking Yes or No Questions
  4. A Simple Quiz Checker
← Back to Javascript for Kids