0

10.1 - Math.floor(10.1) returns 0.09999999999999964

I was expecting to get 0.1. How can this be achieved?

console.log(10.1 - Math.floor(10.1));
PM 77-1
  • 12,933
  • 21
  • 68
  • 111
Daarwin
  • 2,896
  • 7
  • 39
  • 69

0 Answers0