Answers for "round off a number to the nearest multiple of 5"

0

round off a number to the nearest multiple of 5

    function round(x) {
        return Math.round(x / 5) * 5;
    }
  
var n = 34;
console.log(round(n)); 
Posted by: Guest on July-22-2021

Code answers related to "round off a number to the nearest multiple of 5"

Code answers related to "Javascript"

Browse Popular Code Answers by Language