← All lessons/Variables & Data Types· Lesson 8 of 32

Booleans: true & false

Meet the boolean — a value that is only ever true or false — a gentle warm-up for conditionals.

About 5 min

Yes or no

A boolean is the simplest kind of value: it's either true or false, with no quotes. Booleans answer yes/no questions — *is the game over? is the door open?* — and they're the foundation for making decisions later.

Two booleans, printed.

NOTE

true and false are keywords — never put them in quotes. "true" (with quotes) is a *string*, which is a different thing entirely.

Your turn

At the top level, declare a variable named isReady and set it to the boolean true (no quotes).

Hints