Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on JavaScript Coercions Grid. Parent comment
-0 + 0; // 0 -0 + (-0); // -0 -0 - 0; // -0
----
Consider the counter-argument, that it's intuitive/correct because in math `X + (-X) = 0`:
3 + (-3); // 0 -3 + (3); // 0 -0 + (0); // 0 0 + (-0); // 0
X + (-X) = 0 // --> X = 0 - (-X) // --> X = 0 + X
There are no comments on this comment yet.
----
Consider the counter-argument, that it's intuitive/correct because in math `X + (-X) = 0`:
It's true that this characteristic by itself is preserved, but where it falls apart: That final statement should be true for all X, but as demonstrated above, it's not true for -0.