Javascript Calculator 12th case

Tell us what’s happening:
My 12th case is getting failed, but when I manually type the case, it works.
Please tell me where am I doing wrong.
CodePen link:-

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36.

Challenge: Build a JavaScript Calculator

Link to the challenge:

Welcome, ankitrekha.

You are unlikely to get responses, as you have not properly added your code to CodePen. I suggest you reformat it:

Also, please include the testing-suite in the pen.

Some things to note when using CodePen:

  1. CodePen does not expect any content outside the body tags.
  2. All meta, link, and script information must be put in the :gear: settings section of the HTML editor.
  3. You do not need to/cannot link the CSS in your HTML, if you place the CSS in the appropriate section.
  4. If your project uses React, use the Babel preprocessor, and link the CDN in the appropriate :gear: section.
  5. The editors offer the ability to format and analyze your code, providing useful information about forgotten closing tags etc.

If you are still confused with how to use CodePen, please read the official documentation.

Hope this helps

Thanks for informing me . Considering the above points I have changed my codepen code .

The test before the 10.5 - 5.5 test is triggering a bug in your code.

  1. Type 5.5.5

  2. Clear the display

  3. Type 10.5 (decimal point doesn’t work now)

I didn’t look for the bug in the code.

1 Like

Thanks, this solved my problem