Rounding issue in Math.round() & .toFixed()

前端 未结 7 1095
半阙折子戏
半阙折子戏 2020-12-10 16:58

I used below two methods :

Number.prototype.myRound = function (decimalPlaces) {
    var multiplier = Math.pow(10, decimalPlaces);

    return (Math.round(th         


        
7条回答
提交回复
热议问题