Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function rounders(value) {
  2. const iter = (value, div) => {
  3. if (value <= div) {
  4. return value;
  5. }
  6. return iter(((Math.round(value / div)) * div), div * 10);
  7. }
  8. return iter(value, 10);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement