How can I round a decimal number in Javascript to the nearest 10? My math is pretty rubbish today, it could be the 2 hour sleep :/
Some sample cases
Use this function:
function roundTen(number) { return Math.round(number/10)*10; } alert(roundTen(2823.66));