Welcome to the Treehouse Community
Looking to learn something new?
What kind of case that Math.ceil() can have "0"?
Hello What kind of case that Math.ceil() can have "0"? Thanks
Emmanuel C10,635 Points
If you mean what numbers will return 0 if used in Math.ceil(), then it would be any negative decimal that's bigger than -1.
Math.ceil(-.1); // will return 0 Math.ceil(-.000001); // will return 0 Math.ceil(-1.04) // will return -1
What's funny is that when I enter these in the console, I get -0, but it's the same as 0
Thank you, Emmanuel! I understand now. :)))