Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Working With Numbers The Math Object

I just got js to fart. code fart that is.

I was playing with Math.round, and I thought " what if I round a - decimal..." It returned a -0. Negative 0. NVM. I just looked it up and apparently NOW some people thing there IS such a thing as negative zero. Sheesh, next thing I'll find out there's more than one lassie.

Sorry for posting this off-topic, but I'm helping Treehouse investigate a potential issue with their webserver. Please follow this link and leave a comment saying if you have experienced this webserver issue or not.

https://teamtreehouse.com/forum/attention-treehouse-webserver-issues-please-read

Thank you.

1 Answer

Jeff Lemay
Jeff Lemay
14,268 Points

I don't know about the crazies who think there can be an actual negative zero, but regarding your situation I think it's important to retain that it's a negative number. If you're rounding -0.25, you'd still want to know that your number was a negative and not a positive when you round it to the nearest whole number (-0).

Camila N
Camila N
10,677 Points

Hi! I just came here to leave this https://en.wikipedia.org/wiki/Signed_zero Also, I remember using a signed zero with limits in math, I know it does not entirely count as negative zero and it is very weird but the concept exists