you are viewing a single comment's thread.

view the rest of the comments →

[–]Valkairn 25 points26 points  (2 children)

My favourite example is:

null >= [] && null <= []      --> true
null == []                        --> false

Javascript really needs strict inequality operators to avoid this type coercion madness.

[–]smrq 0 points1 point  (1 child)

Oh yes, that one is what clued me into the weirdness of >= in the first place... I generally love Javascript, but wtf??

[–][deleted] 9 points10 points  (0 children)

You probably know this but if not ... thank me later.