JS calculator failing tests, can't figure out why

My calculator keeps failing tests 9 and 12-14. However, when I try it out on my calculator everything works as intended, it can operate on any chain of numbers(immediate execution), it can operate with decimal points, it can operate with negative numbers and it can operate on the results of previous evals. I can’t figure out what’s wrong for the life of me and would really like some help.

The codepen project is here: https://codepen.io/yungbentai/pen/BaRbVyz

Challenge: Build a JavaScript Calculator

Link to the challenge:

For test 9 consider the calculations that are used in test:

3 + 5 * 6 - 2 / 4

For tests 12-14 it seems the way operation history (the one above the result) is displayed is taken as a part of result.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.