MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/21ezh3/javascript_equality_table/cgcn2s2
r/programming • u/vz0 • Mar 26 '14
331 comments sorted by
View all comments
Show parent comments
25
My favourite example is:
null >= [] && null <= [] --> true null == [] --> false
Javascript really needs strict inequality operators to avoid this type coercion madness.
1 u/smrq Mar 26 '14 Oh yes, that one is what clued me into the weirdness of >= in the first place... I generally love Javascript, but wtf?? 10 u/[deleted] Mar 26 '14 You probably know this but if not ... thank me later.
1
Oh yes, that one is what clued me into the weirdness of >= in the first place... I generally love Javascript, but wtf??
10 u/[deleted] Mar 26 '14 You probably know this but if not ... thank me later.
10
You probably know this but if not ... thank me later.
25
u/Valkairn Mar 26 '14
My favourite example is:
Javascript really needs strict inequality operators to avoid this type coercion madness.