JS is poorly understood in comparison
This might be the most hilariously ridiculous true statement I've ever heard.
This might be the most hilariously ridiculous true statement I've ever heard.
x == x _ is true. Good.
x == !x _ is also true. Oops?
And guess what:
Array(3)==",," _ is also true.
But
NaN == NaN _ is false.
Math.max()>Math.min() _ is also false!
but then again
Math.max()<Math.min() _ is true.
Madness, I tell you!
I asked a friend that does web dev and it is apparently pretty idiomatic JS. Pretty appalling. I finally understood why people claimed it was "hard to get right".
x === x; // false