Booleans
Booleans represent logical values: true or false. They're essential for making decisions in your code.
Boolean Values
Loading JavaScript Playground...
Truthy and Falsy Values
JavaScript treats some values as "truthy" or "falsy" in boolean contexts:
Loading JavaScript Playground...
Boolean Operations
Loading JavaScript Playground...
Exercise: Age Check
Create a boolean to check if someone is a teenager:
Loading JavaScript Exercise...
Exercise: Access Check
Check if a user can access content (must be logged in AND adult):
Loading JavaScript Exercise...
Up next · Lesson 8 of 37
Null and Undefined
1 min read
7 of 37 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

