Comment

Comment by Kapow

JS gets even weirder when you include all the comparison operators.

https://jsfiddle.net/5Yzs6/17/

Did you know undefined is equal to undefined, but not <= undefined or >= undefined?

Or that two instances of the same object/array are not equal (e.g. [-1] != [-1]), but are both <= and >= each other?

Or that /.*/ is non-comparable (only != is true) to all numbers, but greater than [-0.5] and "-0.5", and less than [0] and "0"?

parent Kapow 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton