Day 4 of 14 30 min=== vs ==Truthy / falsy?? and ?.
Calculate with arithmetic operators, compare values safely with ===, understand truthy and falsy values, combine conditions with logical operators, and handle missing values with ?? and ?.
By the end of today you can
- Use arithmetic and assignment operators, including % and **
- Compare values with === and !==, and explain why == is risky
- Predict whether a value is truthy or falsy
- Combine conditions with &&, || and !
- Handle null and undefined with ?? and optional chaining ?.
What's inside
- 6 sections
- 3 diagrams and mind maps
- 8 code examples you can run
- 5-question quiz
- 1Arithmetic
- 2Comparing values: always use ===
- 3Truthy and falsy
- 4Logical operators
- 5Defaults for missing values: ?? vs ||
- 6Optional chaining: ?.
Sign in free to read this lesson
Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.
Sign in free