Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,266 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