3
Oh javascript
source link: https://willschenk.com/fragments/2024/oh_javascript/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Oh javascript
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK