var roundedValue = Math.round(myValue / 5) * 5;
You can easily round to the nearest multiple of five by first dividing your value by 5, then rounding it. Afterwards, just multiply by 5 to get your answer.
Want to return the favor?
- Get some recognition & link back to your site.