by dustingetz · 11y ago · 0 comments
"These posts are fundamentally right about == being poorly designed... but they make things look worse by failing to organize the table.... What a mess! But most of the mess is because of the order of values in the table. By grouping equal values together, you get something more sensible"
http://strilanc.com/visualization/2014/03/27/Better-JS-Equal...
The author linked to a jsfiddle that I changed to use the same colors as the original table and improved the legibility a bit which you can find at http://jsfiddle.net/4c5z60qg/ or view as an image here: https://i.imgur.com/assIoqN.png
For example, few people would immediately be able to know where place the following into the table so that it still looked good:
['Infinity']
'0e1'
['infinity']
'0X0'
[false]
["+0.e4"]
[[[[1.,]]]]
and so on :) (A bit more time, and I could probably come up with even stranger examples).