My calculator does not pass the tests

I am getting the right value, but maybe I’m not fully understanding what the test wants?


This is also written under the test:
ne([r,“add”,n,s,“six”,u,t,l,“four”,c]),Object(o.assert)(“32.5”===oe(document.getElementById(“display”))||“11.5”===oe(document.getElementById(“display”)),"The expression 3 + 5 * 6 - 2 / 4 should produce 32.5 or 11.5 as an\n answer, depending on the logic your calculator uses\n (formula vs. immediate execution) "),f(),ne([n,u,a,“add”,n,c]),Object(o.assert)(“1”===oe(document.getElementById(“display”)),"The expression 5 - 9 + 5 should produce a result of 1 ")

this is part of my HTML

I don’t really know what other parts of the code might cause the problem. Tell me if you need any more pictures.

I also tried writing the equation using a different order and still got the right answer like that test said

It helps to share your entire code. Pictures of parts of your code aren’t really helpful. Thanks!

would this link help:
does it allow you to see my code?

1 Like

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