Why does JavaScript Have `-0`? medium.com/javascript-in-… (Yes, there's `-0` and normal `0`. They're equal but are different objects nonetheless.)
5
49
132
0
16
@JavaScriptDaily Because JS supports real physics. 1/0 approaches ∞ and 1/-0 approaches -∞. Also, 1/∞ approaches 0 from positive direction and 1/-∞ approaches (-)0 from a negative direction. This is correctly represented in JS.
@JavaScriptDaily Because it is a screwed up language. And we still promote it as the language of the future.. 😉😂
@JavaScriptDaily Cool, but WHY is it needed in language, and what can it be used for is left unanswered. WHY would I care how to tell them apart in first place?