Skip to content

Instantly share code, notes, and snippets.

@fatihacet fatihacet/code.js
Created Oct 30, 2011

Embed
What would you like to do?
Convert number to nearest 10x digit
// Divide by 10 and round it, then multiply by 10.
var x = 136;
console.log(Math.round(x / 10) * 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.