FCC Calculator Test

Please help! My calculator is working, see:

But … it is failing this test:

"8. As I input numbers, I should be able to see my input in the element with the id of “display”

Numbers do not display correctly within id=“display” : expected ‘0’ to equal ‘123’"

I’m baffled as to why 0 is expected to equal 123? I need to tidy up a little to pass the rounding tests, but I am really struggling to understand what I need to change to pass the FCC tests when everything appears to be working.

Any help is greatly appreciated!

Thank you!

A few things:

  • The id’s on the buttons need to be on the <button>s not the <div> that wraps them.
  • The id="display" needs to be on the div that displays the final answer, not the div that mimics the buttons you press. You have them backwards.
1 Like

Thank you! I really appreciate the feedback - what you suggested to look at has worked. It’s really very helpful!

I had got quite stuck on trying to figure out how the tests were working!

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