DEV Community

anil sen
anil sen

Posted on

2 2

How is my calculator. need some feedback and improvements in my Calculator app.

Here is the link of my calculator.
gitanilsen.github.io/calculatorV1/

Top comments (4)

Collapse
 
alyatek profile image
alyatek β€’

Try catching the errors, and not allowing to put more than 1 plus sign (or any other sign) in a row because it errors out and the erro SyntaxError: Unexpected token stays there while stuff is written.

Collapse
 
gitanilsen profile image
anil sen β€’

What should I do then please suggest me If I can improve my code.

Collapse
 
alyatek profile image
alyatek β€’

For the errors, just catch them and show an error message.
To prevent the error like 2 plus signs in a row compare the last character in the string to the one that was pressed.

Thread Thread
 
gitanilsen profile image
anil sen β€’

Thank you for support.I really appreciate your suggestion. I will improve my code..☺️

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay