Suppose I have a value of 15.7784514, I want to display it 15.77 with no rounding.
var num = parseFloat(15.7784514); document.write(num.toFixed(1)+\"
It's more reliable to get two floating points without rounding.
Reference Answer
var number = 10.5859; var fixed2FloatPoints = parseInt(number * 100) / 100; console.log(fixed2FloatPoints);
Thank You !