Can you please critique my calculator?

Hey guys, I just did some finishing touches on my calculator. I used HTML5, CSS3, and JavaScript. Please let me know what you think. Thanks!

It looks good @mish. Some logic needs to be rethought. For instance I can input;

  • (I should only be allowed one decimal point)
  • I’m unable to chain a calulation. For instance when I enter 25 - 6 x 2 and press the equal sign the answer returned is NaN. It should return 13 or at the very least return 38. (According to your README it should return 38.)
  • Maybe put in a decimal limit. 7 / 3 the answer scrolls off the screen
1 Like

Thanks for the input. I think I have fixed the issues. I have updated the links above. Thanks again!

1 Like

Nice job @mish. Looks good.

i did some calculation with your calculator and any time i press the equal sign and do the next calculation, the answer will be behind the previous answer. it does not clear the previous answer

1 Like

@UzaifaJamina, that is the way most calculators work.

If I’m understanding you correctly you’re doing something like;
12 - 2 = and getting an answer of 10 then entering something like x 5 and getting an answer of 50.
When I do that on this calculator or any other calculator I have in my house I get the same answer.

If what I’ve described is different than what you’ve stated please clarify.

I think what @UzaifaJamina means if you do 5+8 then press equals, the display shows the answer 13. Then press a number like 5, then the display will show 135. Instead of clearing off the 13 and display only 5 as the first number and continue on with a new calculation.

Ahhhh, I see @mish. I misunderstood.

yes as Mish explained

Hi @UzaifaJamina and @Roma , do you mind taking another look at my calculator? I updated the link not the GH yet. Thanks!

@mish looks better. The issues I noted previously have been corrected with the exception being that the user is allowed to enter more than one decimal point.
For instance, 7.23.5 should not be allowed.

Thanks @Roma I think I fixed it.

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