I want to Round off the decimal place of a number to the next multiple of 5 I have tried this but it's not working for decimal places
const roundOff = (num) =>{
let temp = parseFloat(num.toFixed(2)) // to make it 2 place decimal
return Math.ceil(temp / 5) * 5
}
roundOff(54.5678) // should give 54.60
roundOff(43.738) // should give 43.75
roundOff(89.982) // should give 90.00
roundOff(80.034) // should give 80.05