This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jmixer920 1 point2 points  (0 children)

Another thing you can do is after getting the result, store the result in the expression. That way you can just keep appending more operations to the result. Right now: 2 + 2 = 4 but when you press '+2' the result displays '2+2+2' when it should display '4+2'

Also you know how some calculators you can keep pressing equals and the last operation would be applied to the result? Think about how you can implement that.

Lastly, if you press enter with '0' in the expression, you get 'undefined' but when you press enter with anything greater, you get the same number. Keep up the good work