I can't believe with all the advances javascript has made in the last 10 years and 11.10 - 10.11 = 0.9900000000000002 is still an issue. I had a bug come in today where customers were trying to match a positive and negative that should have had a difference of zero but was showing a difference of like 1.83. It turns out it's because javascript can't add certain numbers without losing its mind. Adding .toFixed(2) in a couplle of places fixed the issue but really? I need to do this why?
DOH! Network
- News
- ...