Dropping the '.00' when printing floats that hold whole numbers

Posted by navycoolguy on Stack Overflow See other posts from Stack Overflow or by navycoolguy
Published on 2010-05-11T14:52:25Z Indexed on 2010/05/11 15:14 UTC
Read the original article Hit count: 198

Filed under:
|
|

I'm currently displaying a quantity in Javascript. I want it to display (for example) the whole number as 89 instead of 89.00; however, if the number is fractional like 89.50 then it should display 89.50

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about decimal