True and False
Meet the two special boolean values.
True and False 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.
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! 🚀
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, 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 “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; 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 “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.