Calculator calculation error

Hello ladies and gentlemen

here is the link

I am having trouble coming up with a setting up the display for a sequence like the one below


my calculator appends the number to the solution instead of replacing what is on the display and starting fresh.

Spent a while trying to debug but couldn’t figure it out sorry.

Focusing on having pure functions that don’t mutate variables outside of their scope can make code less error prone, easier to debug, and more readable as you can test each function individually.

I found another bug?

Try 8/4 = /2 =.

That should give a valid result but produces NaN.

1 Like

damn it!!! yeah I thought i fixed it but no good. It seems to only happen in division and multiplication operation but why???