News for hackers. Stuff that matters.
Re:JavaScript Equality Table by Gepser on Wednesday March 26, 2014 @06:42PM (#7477184)
It's funy that "true==[[]]" is false but "false==[[]]" is true. Maybe someone could explain why "[[]]" is considered false?
Re:JavaScript Equality Table by program on Thursday March 27, 2014 @04:29AM (#7479184)
If you write ([[]] == false) you compare values of this object. Internally a [[]].toString() is called which gives an empty string (cause the first element is also an empty array) which in turn is considered false in javascript.

Otherwise [[],[]] is true cause cause [[],[]].toString() gives you this string: ",".

Re:JavaScript Equality Table by dzderic on Wednesday March 26, 2014 @08:34PM (#7477757)
Even better, [1] == 1 but [1] != [1]
Re:JavaScript Equality Table by dllthomas on Wednesday March 26, 2014 @06:45PM (#7477201)
If "false == X" is true, shouldn't we expect that "true == X" is false?