0Pricing
Javascript for Kids · Lesson

And, Or, Not

Combine conditions to make decisions.

And, Or, Not is a free Javascript for Kids lesson on CoddyKit — lesson 2 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.

Super Boolean Powers! 💪

Now we mix booleans together to make new answers! 🎉

We use three magic helpers: AND, OR, and NOT.

AND Means Both 🤝

&& means AND. Both things must be true!

Sunny AND warm = perfect day! ☀️

let sunny = true;
let warm = true;
console.log(sunny && warm);

AND Is Picky 🧐

If even ONE side is false, AND gives false. Both must be true! ✌️

let hasMap = true;
let hasKey = false;
console.log(hasMap && hasKey);

OR Means Either 🙌

|| means OR. Just ONE side needs to be true!

Ice cream OR cake? Either makes me happy! 🍦🍰

let iceCream = false;
let cake = true;
console.log(iceCream || cake);

OR Is Friendly 😊

OR is happy if at least one thing is true. Only false if BOTH are false. 🙃

let rain = false;
let snow = false;
console.log(rain || snow);

NOT Flips It! 🔄

! means NOT. It flips true to false and false to true! 🙃

let hungry = true;
console.log(!hungry);

NOT Is a Mirror 🪞

NOT is like a magic mirror. Whatever it sees, it shows the opposite! 🪞

let dark = false;
console.log(!dark);

Mix Them Up! 🎨

You can use them together for big magic! 🌟

let day = true;
let sleepy = false;
console.log(day && !sleepy);

A Game Example 🎮

Can the hero open the chest? They need a key AND must be near it! 🗝️

let hasKey = true;
let nearChest = true;
console.log(hasKey && nearChest);

Remember the Symbols 🔣

  • && = AND (both) 🤝
  • || = OR (either) 🙌
  • ! = NOT (flip) 🔄

You Got Super Powers! 🦸

Awesome! You can mix booleans now. 🎉

AND, OR, and NOT make your code super smart!

Quick Check 🧠

Question time! 🎯

Logic Hero! 🏆

Hooray! You mastered AND, OR, and NOT. 🦸

Next, we ask yes-or-no questions with comparisons! 🚀

Frequently asked questions

Is the “And, Or, Not” lesson free?

Yes — the full text of “And, Or, Not” 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 “And, Or, Not”?

Combine conditions to make decisions. 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 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “And, Or, Not” 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