Student-friendly HTML, CSS, and JavaScript reference with examples
Strict equality operators check if values are exactly the same, including their type.
5 === 5 // true (same type and value)
5 === '5' // false (number vs string)
'hello' === 'hello' // true
true === 1 // false (boolean vs number)
Returns true only if both type AND value match.
5 !== 10 // true (different values)
5 !== '5' // true (different types)
'cat' !== 'cat' // false (exactly the same)
Returns true if type OR value are different.
const age = 18;
const input = '18';
age === input // false! (number !== string)
Always use === and !== in JavaScript to avoid surprises.