Last time, we learned about booleans and how the ===
operator checks if two values are strictly equal, resulting in a boolean.
Comparisons are essential for making decisions in programs.
Engagement Message
What if we want to check if two values are not strictly equal?
JavaScript uses !==
(an exclamation mark followed by two equals signs) to check for strict inequality.
10 !== 5
evaluates to true
because 10 is not equal to 5.
Engagement Message
What boolean value would 10 !== 10
produce?
We can also compare if one number is greater than another using the >
symbol.
15 > 10
results in true
.
10 > 15
results in false
.
Engagement Message
What do you think 10 > 10
evaluates to?
