Hi
I’m struggling to pass all the tests for the JS Calculator
Link to my CodePen
Taken individually my calculator can pass all the tests (please try by yourself in my CodePen), but when I run the Automated Test, 4 of them fail:
- The expression 5 - 9 + 5 should produce a result of 1
- The expression “5 * 5.5” should produce an output of “27.5” : expected ‘302.5’ to equal ‘27.5’
- The sequence “5 * - + 5” = should produce an output of “10” : expected ‘-250’ to equal ‘10’
- The sequence “5 + 5 = + 3 =” should produce an output of “13” : expected ‘9.55’ to equal ‘13’
I think this is due to how the Automated Test runs all its tests consecutively but I cannot find what is wrong with my code.
Thanks in advance
Summary
This text will be hidden