Calculator Project Help for Passing Tests

Hello all,

I suspect I’m missing something, but I can’t tell why my (still unstyled–please forgive formatting) calculator is failing tests that it appears to pass.

I believe I am correctly implementing the requested ids for numpad buttons and operator buttons, and I have an element with ID ‘display’. Any advice would be appreciated!

Here’s a link to the site: React App (master–

And here’s a link to the repo: brentonhaerr/calculator: ReactJS calculator app (

This question (ID ‘display’) has been asked repeatedly and solved. Just scroll down the list of latest questions.

To clarify–did you look at my code and notice that there is indeed an issue with the display element’s id? It appears to look correct to me when I inspect it with developer tools:

<div id="display" class="col-11 text-end fs-1">0</div>

I can look closer if that is where the issue lies. I just don’t see it, while I did see a lot of questions about people who were passing id as a value to a react component but weren’t having it output as an HTML element (which I don’t think is my issue).

No issue with your code. Issue is with React version. Not many questions on calculator. You should find the ones that are related to your problem.

1 Like

Ah, yes, you are correct. Thanks. So it’s just a bug in the test suite? Passing all 16 tests now.

Replaced the commented out section with the older render syntax below.

// const root = ReactDOM.createRoot(document.getElementById('root'));
// root.render(
//   <React.StrictMode>
//     <App />
//   </React.StrictMode>
// );

ReactDOM.render(<App />, document.getElementById("root"));
1 Like

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