Javascript Bug in toFixed(2) function?

Viewed 60

Is there some kind of bug in the toFixed function in Javascript ?

6.075.toFixed(2) // = 6.08 (correct!)
8.075.toFixed(2) // = 8.07 (wrong!) should be 8.08 right ??

Am I missing something ?

Why is this, what's going on ? How can I get 8.075 to round correctly up to 8.08 ?

Thanks!

0 Answers
Related