Consider this scenario:
You have a number, let's say 12.5, and you want to round it up to the next multiple of ten (20). Or if you have a number between 20 and 30, it should be rounded up to 30.
How can this be achieved using JavaScript?
I have searched extensively for a solution but haven't found one yet.
UPDATE: I made a small English mistake in my explanation earlier. What I meant was the nearest multiple of ten (10, 20, 30).
UPDATE 2: Following the method provided in the answer below (now marked as correct), I was able to successfully address my issue.