in javascript, let's say I got a random number 136, I would like it to automatically convert it to 140 or if I got from 124 to 120, etc. or from 24 to 20, etc.
Divide by 10 and round it, then multiply by 10.
var x = 136; console.log(Math.round(x / 10) * 10);
I would just do this: (Math.round (YourNumber / 10)) * 10