rounding numbers ending in 5 in js code example
Example 1: javascript round to nearest 10
var rounded = Math.round(number / 10) * 10
Example 2: Javascript round number to nearest 5
function round5(x)
{
return Math.ceil(x/5)*5;
}
var rounded = Math.round(number / 10) * 10
function round5(x)
{
return Math.ceil(x/5)*5;
}