multiply
multiply
JavaScript Round To Nearest Number
Sat, 04/11/2009 - 20:47 | by philipnorton42The JavaScript Math.round() function will round a decimal to the nearest whole number, but I found that I needed was to round a number to the nearest 10. So after a bit of thinking I realised that I could divide the value by 10, round it using the round() function and then multiply the result by 10.