calculator app using vanilla js

Solution retrospective
Tried to handle calculation syntax error 🤯 like windows calculator does.
This challenge became little challenging when I was trying - calculator will automatically turn the incorrect syntax into correct syntax, like the use cases:
- user pressing equal key (=) without giving operator and operands
- user just input single operand and then pressing equal key(=)
- user input an operand that has only decimal point but no digit
- one calculation is just finished but user again pressing equal key without giving any input
- user input operator(+,-,/*) without inserting operands
- user using the calculation result as a the first operand
please know me your feedback, any suggestions, bugs
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Abhijit Barman's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord