1
console.log(0.03 %  0.01);

When i run this calculation i get the following result:

0.009999999999999998

In my understanding the result should be 0, what is going on here?

boybou
  • 13
  • 2
  • I dont really believe the duplicate question is related to this question. Rather read the specification for the remainder operator here: https://tc39.es/ecma262/#sec-numeric-types-number-remainder – Francois du Plessis Aug 26 '20 at 19:07

0 Answers0