Rounding Off To Desired No Of Digit After Decimal

[Solved] Rounding Off To Desired No Of Digit After Decimal | Perl - Code Explorer | yomemimo.com
Question : Rounding off to desired no of digit after decimal

Answered by : determined-dragonfly-nwotblemrmvq

(6.688689).toFixed(); // equal to "7"
(6.688689).toFixed(1); // equal to "6.7"
(6.688689).toFixed(2); // equal to "6.69"

Source : https://stackoverflow.com/questions/9453421/how-to-round-float-numbers-in-javascript | Last Update : Sun, 12 Dec 21

Answers related to rounding off to desired no of digit after decimal

Code Explorer Popular Question For Perl