I used below two methods :
Number.prototype.myRound = function (decimalPlaces) { var multiplier = Math.pow(10, decimalPlaces); return (Math.round(th
Just use Math.round
Math.round
function round(figureToRound){ var roundOff = Math.round((figureToRound* 100 ).toFixed(2))/100; return roundOff; } console.log(round(1.005));
This will help the rounding off issue completely.