Friday, 23 December 2016

Round number up in JavaScript

I have the following number



0.135


I'd like to round it to 2 decimal places, I'm using...




(newCostDiff/2).toFixed(2)


only this returns



0.13


Can anyvody advise me on how to do this?

No comments:

Post a Comment