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,254
  • 20
  • 64
  • 106
Daarwin
  • 2,710
  • 7
  • 33
  • 62

0 Answers0