News for hackers. Stuff that matters.
Re:JavaScript: Warts and workarounds by spicyj on Tuesday February 14, 2012 @12:16PM (#3590817)
One of the strangest things about == is that although it's commutative, it's not transitive:

  0 == '0'  // true
  0 == ''   // true
  '0' == '' // false
Re:JavaScript: Warts and workarounds by jaysoo on Tuesday February 14, 2012 @08:19PM (#3592567)
Is it really that strange?

Those statements are basically (as per ECMA-262 11.9.3):

0 === Number('0') 0 === Number('') '0' === ''