money = 0.56;
money -= 0.50; // here the result is 0.06000000000000005 when actually i need it to be just 0.06
money -= 0.06 // and after this subtraction the result becomes 5.0306980803327406e-17
console.log(money); // 5.0306980803327406e-17
This totally messes up my logic when for example I compare "money" with the number 0.