Why is "0 === -0" true in JavaScript?

Viewed 413

In a recent post on http://wtfjs.com/. An author writes following without explanation which happens to be true.

0 === -0 //returns true

My understanding about === operator is it returns true if operands point to same object.

Also, - operator returns a reference to negative value of operand. With this rule, 0 and -0 should not be the same.

So, why is 0 === -0 ?

3 Answers
Related