who can tell me why:
console.log(4 - 1)
console.log(4.2 - 1)
console.log(4.01 - 1)
But:
console.log(4.1 - 1)
console.log(4.02 - 1)
Tried with parseFloat - same issue
Was able to get the desired result with number.toFixed(2). Still, where is that decimal coming from.
Whats the JS explanation for this?