DRAFT
Not Observed
() = ()
compares only the types of the two operands.
() = () compares only the types of its operands
() = () compares the values of its operands
The () = ()
operator compares the values of its operands.
While the following block, with operands of different types
(the first a string, the second a number)
evaluate to false
the following block also evaluates to false
;
the two operands have the same type, they are numbers,
but they have different values:
In JavaScript there are different equality operators (==
and ===
),
and the difference in their semantics
has something to do with the types of their operands.
Follow us on twitter to hear about new misconceptions.