BUG in Demo app: Build a JavaScript Calculator

HI guys!

I was checking the demo app in the “Build a JavaScript Calculator”. I think the Demo does wrong mathematical operations chaining (see picture attached).

*I couldn’t check the code since I have to do the challenge. :slight_smile:

Personal choice whether you choose to build a scientific calculator or not. If you can track down a basic 4-function calculator like this one I think that you’ll find that it evaluates each operation as it’s input. In fact, if you are on a windows computer and set the calculator to “standard” you’ll see it.

1 Like

I don’t have a link to it anymore, but a couple of years ago someone built a perfect replica of the high end graphing calculator they used in high school and college. It was a wonder to behold.

Most people settle for more along the lines of the free one your bank gives you, although I have seen campers add ( and ) to allow for longer expressions.

1 Like

I can understand that, except that the demo App visually is chainning operations rather than showing the result as you add operations (like in your example). Which can be misleading in regards to the user story.

I can keep chaining mathematical operations together until I hit the equal button, and the calculator will tell me the correct output.

I agree, the way it does this is ‘wrong’ in terms of order-of-operations. Make yours better!

1 Like

I opened the same post some weeks ago. In the beta version this problem is not there anymore.
I suppose dat add “(” at the start and “)” at the end of the lines gives more sense.

1 Like

See the following post where I explain why there is more than one “right” way to build a calculator.

1 Like