Break my calculator

Hi guys. Just finished my calculator project. I am a bit of a perfectionist so please play with it and try to break it. Let me know any bugs you find. Thanks in advance. All criticism is welcome.

Codecamp Calculator

Seems solid! The only thing I noticed: you can add multiple zeros (at the start, e.g. 0000000010)

Thanks a lot for that one, I have fixed it. limited to 2 places after the decimal. Keep going :slight_smile:

it doesn’t implement order of operations. 9+1*2-3 gives the result of 17

The calculator is sober and nice…
I got two things not bugs:
1.I want to add 5+4, By mistake if I typed ‘5’ and ‘-’ then if I try to change it to ‘+’ its not changing to ‘+’. In my opininion it should change to last typed operators.
2.If I typed '5 + 5 = ’ I got the answer 25 then if I type ‘x 10’ it should give 250. but yours not.

My english is not good, so I doubt you get my words what I am saying…

Ohhh this i am aware of. I know it doesn’t follow BODMAS, but that’s a lot of code I didn’t want to write. Besides, I noticed the codecamp example calculator doesn’t either. I figured, they calculate as they go, my calculator calculates at the end of the input, so BODMAS would be easier to implement, I just really really don’t want to do it at this point.

Thanks for the feedback. you can actually change your input and last operator with the “CE” button. Try it :slight_smile: if you type “5+4” press “CE” it will erase last input to “5+”, press again it’ll become “5” then you can press “-” and carry on.

The second point about keeping the last answer, interesting. I might include that feature later on. Never thought about it :smiley: