JAVASCRIPT CLIMBSChapter 2 · JS Conditionals & Logic
Strict Equality
JavaScript uses === (strict equality) and !== (strict inequality) to compare both the value and the type. Avoid ==, which can coerce types and cause hidden bugs.
Worked example
How it reads
- altitude > 500 compares numbers, returning true
- === checks if value and type are identical, returning false here

Cloud tip: Always use strict equality ===. Using double equals == invites unexpected type conversion behavior.


