true
false

Booleans are simple: they are either true or false.
Like a light switch. on or off.

let isLightOn = false;

True or False

A Boolean is the simplest data type. It can only be true or false. Think of it like a light switch: ON (true) or OFF (false).

Comparisons

We use comparison operators to create booleans. Is 5 greater than 3? Yes (true). Is 10 equal to 20? No (false).

Logic Gates (&&, ||)

Combine booleans with Logic Operators. AND (&&) needs both sides to be true. OR (||) only needs one side to be true.

Logic Unlocked!

You now understand the binary heartbeat of code.
Ready for the sound of silence? Null & Undefined.

AlgoAnimator: Interactive Data Structures