Please check out my calculator


#1

Here is a link to my calculator. I wanted to write it using pure JS. Theres still a few things I’d like to work on but basic functionality is there.

Any feedback is greatly appreciated!


#2

Great job, looks exactly like the iOS calculator used to! It’s really straightforward and clear code too, I spent a lot of time worrying about how to center the buttons did all this stuff to keep them the same size, but your way was much simpler, kudos.

What else are you thinking of adding? If you’re looking to add functionality, I would make it work with the keyboard numpad too.


#3

Thanks PhysRex!

I would for sure like to add keyboard numbers, thanks for mentioning that.

The other two things I still need to do is: Just display the current number if the equation = NaN, like 2+ =

The other is only allowing a certain number of characters on the screen if the result of an equation is large like 1111111.11111111111111111 or small like 0.0000000000002222222211111. The built in functions I tried didn’t really help specifically with those.