Reading through the ECMAScript 5.1 specification, +0 and -0 are distinguished.
+0
-0
Why then does +0 === -0 evaluate to true<
+0 === -0
true<
We can use Object.is to distinguish +0 and -0, and one more thing, NaN==NaN.
Object.is
NaN==NaN
Object.is(+0,-0) //false Object.is(NaN,NaN) //true