Thursday, October 31, 2019

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

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...