I want to round numbers to hundreds with javascript like this:
10651.89 = 10700
10649.89 = 10600
60355.03 = 60400
951479.29 = 951500
1331360.95 = 1331400
How can I do that ?
Thanks a lot.
function roundHundred(value){
return Math.round(value/100)*100
}
Live example with your test cases: http://jsfiddle.net/LaPGs/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With