I have a javascript formula that rounds off the input number number
.
var number = x;
alert (Math.round(number / 10) * 10);
This will output 11,12,13,14 as 10 and 15,16,17 as 20.
This is not what I want; I want to add 1 to 10 (11) and round it up, which will return/print 20.
Example:
- 11, 12 ,13, 14... 19 rounds to 20
- 21, 22... 29 rounds to 30
- etc.