Submitted
Vanilla JS, OOP, Sass
- HTML
- CSS
- JS
One of my most difficult projects. I wanted to practice coding using the object oriented paradigm as well as organizing my code to be as readable and clean as possible. I'm hoping to eventually add the ability to interact with the calculator using the keyboard.
One problem I ran into was working with large numbers, numbers over 7 digits (10,000,000) while also allowing the display of numbers to include the commas. Has anyone run into this problem? If so, how were you able to tackle it?
I used number.toLocaleString()
to convert the number to include commas, but when converting the string back to a number to perform calculations, it returns NaN if the number is over 7 digits. I assume because it's considered a BigInt, BigFloat, etc...
But anyway, any feedback is welcomed :)