DEV Community

Discussion on: Dealing with Floating Point Numbers in JavaScript: Lessons Learned

Collapse
 
kyosifov profile image
Kaloyan Yosifov

That's right!

We do not store floating point numbers in the database, but on the frontend we needed to allow users to change the amount. So for the presentation layer we had to convert from cents to floating point and then when we send the amount, back to the server, to cents.