Does anyone know how to round up a number to its nearest multiple of 5? I found an algorithm to round it to the nearest multiple of 10 but I can\'t find this one.
T
You can use this method Math.round(38/5) * 5 to get multiple of 5
Math.round(38/5) * 5
It can be replace with Math.ceil or Math.floor based on how you want to round off the number
Math.ceil
Math.floor