3

Oh javascript

 4 weeks ago
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.

April 18, 2024 9:56 am

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.

Set documentation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK