Outline
In JavaScript, ===
is a strict equality operator comparable to ==
in most high-level languages. It checks that both type and value are the same. On the other hand, ==
in JS will only check that values are the same, but not type.
This means that '5' == 5
would return true
while '5' === 5
returns false
.