Javascript Calculator failed to pass test #9, #12, #13 and #14

Good day!

This is my version of Javascript Calculator: https://codepen.io/faber_g/pen/YzLpVWX

I can not understand why it can’t pass test #9, #12, #13 and #14. When I make calculations by myself, answer is same like in the test, but when run it througth test, it is failed.

Please give me some hint where I missed problem.

Thank you!

it pass perfecly (16/16 Passed) when I tested the codepen that you provided it

try: test it with other bowser or in local terminal.

Thank you for your comment!
Now it can pass because with a help of people from the stackoverflow website, I solved this problem.
The problem was that calculator had wrong id’s for ‘+’ and ‘-’ buttons The tests are using the button id to press it, not its text.

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