5
Number
Toggle
"5"
String
true

Loose equality (==) converts types to match.

console.log(5 == "5"); // true

Equality Checks

Is 5 the same as "5"? With loose equality (==), yes. With strict equality (===), no. Always define your intent clearly.

Relational Operators

Comparing values. Is 10 greater than 5? Yes. Use >, <, >=, and <= to find out where values stand.

Inequality

Checking if things are NOT equal. Like equality, we have loose (!=) and strict (!==) versions. Strict is safer.

Master of Comparison

You can now judge values with precision.
Time to make decisions based on these comparisons.

AlgoAnimator: Interactive Data Structures