1如何:將x除以5,四捨五入到最接近的整數(使用Math.ceil函數),然後乘以5? 2回合5(5)應給5. 這將完成工作: function round5(x) { return Math.ceil(x/5)*5; }.
確定! 回上一頁