I'm having trouble understanding the behaviour of the equality operator in JavaScript. This is what I get when I run the following commands on a browser's console:
new Object() == true // returns false
new Object() != false // returns true
Now, I don't agree with the fact that an Object should be false (although I have understood why after checked the ECMAScript Language Specification), but what really bothers me is that I get two different results on two equivalent logical expressions.
What's happening?