0

As we know, in Javascript 0.1 + 0.2 does not return 0.3 - it returns 0.3000000004. I have a problem while I am building a calculator in Javascript. Usually, we use the toFixed() function to format a number using fixed-point notation. But on a calculator, we can not expect the number of digits to appear after the decimal point. So how can I solve this problem?

ZaO Lover
  • 433
  • 2
  • 13

0 Answers0