Javascript for Kids · Lesson

True and False

Meet the two special boolean values.

Lesson 1 of 413 steps

True and False is a free Javascript for Kids lesson on CoddyKit. This is 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, and your progress syncs across the web and the CoddyKit app. The Javascript for Kids course includes 4 lessons in total.

Yes or No? ✅❌

Some things are simply true or false. 🤔

Is the sky blue? true! Is a fish purple? false!

Meet the Boolean 🎚️

In code, true and false are called booleans. 🎚️

A boolean is like a light switch: ON (true) or OFF (false)! 💡

Just Two Words 🔠

There are only two boolean values: true and false. 😄

console.log(true);
console.log(false);

Save a Boolean 📦

We can keep true or false in a box. 🎁

let isHappy = true;
console.log(isHappy);

No Quotes Needed! 🚫

Careful! true is special. It is NOT the same as the word "true" in quotes.

Booleans never wear quotes. 🎩

let raining = false;
console.log(raining);

Booleans Answer Questions 🙋

Booleans are great for yes/no facts about your game! 🎮

let gameOver = false;
let hasKey = true;
console.log("Has key? " + hasKey);

Switch It! 🔀

You can change a boolean any time, just like flipping a switch. 💡

let lightOn = false;
console.log(lightOn);
lightOn = true;
console.log(lightOn);

Booleans in Real Life 🌍

Think of yes/no facts about you:

  • I like pizza 🍕 = true!
  • I can fly 🦸 = false!

Naming Boolean Boxes 🏷️

Good boolean names start with words like is or has.

Like isSunny or hasCandy. 🍬

let isSunny = true;
let hasCandy = false;
console.log(isSunny);

Why Booleans Matter 🧠

Booleans help your code make choices! Should the door open? true or false! 🚪

They are the brain of every game. 🎮

You Met Booleans! 🎉

Great job! You learned about true and false. ✅❌

These two little words are super powerful!

Quick Check 🧠

Fun question time! 🎯

Boolean Buddy! 🏆

Yay! You know true and false now. ✨

Next, we learn to combine them with AND, OR, and NOT. Get ready! 🚀

Free to start

Learn JavaScript with an AI tutor — free

Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.

Courses
35
Lessons
140

Frequently Asked Questions

Is the “True and False” lesson free?

Yes — the full text of “True and False” is free to read here on the web. 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. The Javascript for Kids course includes 4 lessons in total.

What will I learn in “True and False”?

Meet the two special boolean values. 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, so you can start here or from the beginning and move at your own pace. This is lesson 1 of 4.

How long does the “True and False” 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