Hello there! I’ve been working on my calculator project and honestly it has been frustrating. Some tests fail, even when the suggested expression and output matches with the expression and output of when I input it manually.
Can someone point out what am i doing wrong?
Here’s my code on CodePen. Btw, theres no styling yet…I’m focusing on make it work first. arenodi Calculator Project
You can see the test results here to find out what failed.
Test9: If you try ‘6+2*2=’ you get 12 instead of 10. You need to allow chaining of operations of any length before evaluation ‘=’
Try to satisfy all the test requirements.
FIXED.
The bug was that when the test would try to insert a new value after pressing equals, the expression would keep an equal sign (“=”) failing to be evaluated by the math lib.
I just fixed that and all 16 tests went through.