Oh javascript
- tags
Contents
Somehow this sort of thing in Ruby is charming, and in JavaScript just a never ending source of confusion.
Value equality is based on the SameValueZero algorithm. (It used to use SameValue, which treated 0 and -0 as different. Check browser compatibility.) This means NaN is considered the same as NaN (even though NaN !== NaN) and all other values are considered equal according to the semantics of the
=
operator.
Previously
labnotes
Next