var num1 = parseFloat("10.547892") var num2 = parseFloat("10.547892").toFixed(2) console.log("Without using toFixed() method"); console.log(num1); //10.547892 console.log("Using toFixed() method"); console.log(num2); //10.55