Front End Development Libraries Projects - Build a JavaScript Calculator

Tell us what’s happening:
Describe your issue in detail here.
The code gives odd decimal results. I am sure I am putting in the right dot character, and by using logs, the decimal is converted correctly. Looking at the testcases, it seems to be a correct answer, but with odd characters (the wrong cases).
Please somebody help me. I’ve been looking for the answer and re-writed the entire program twice, it’s been hours and nothing. Maybe I missed something in a lesson.
Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0

Challenge: Front End Development Libraries Projects - Build a JavaScript Calculator

Link to the challenge:

1 Like

Test #9 doesn’t pass because your answer isn’t shown in an element with an id of “display”. It should be an easy fix.

Your calculator can’t handle decimals between 0 and 1. You should look into that. I hope it helps you find where it blocks.

Also, unrelated to your issue but, you should try to avoid directly manipulating the DOM if you use React :slight_smile:

1 Like

Finished!
Should have think about it better before coding. I just ran myself to the action. Thank you!