Infinity and Negative Zero in Javascript
keeganj.comSo, how does one get an -0 short of typing it?
I first ran into it when our database was holding negative values that we wanted to show as positive on the front end. To flip the sign we would multiply the stored value by -1. Since 0 was a valid value in our DB, the displayed value after multiplication was -0, which looked like a glitch in the UI.