Design comparison
SolutionDesign
Community feedback
- @better5afePosted about 1 year ago
Hi there,
First of all, congrats on completing the project!
There are a few functionalities that you may consider to add or improve:
- if a calculation is empty, it would be a good idea to prevent the user from adding another zeros. You can do it by adding an conditional statement that will check if operation is empty and the button value is 0, if yes then just return
- it would be a good idea to display an error if the user is trying to divide by 0
- currently, if you add a decimal point without any numbers and press on one of the operators, it is possible to add another single decimal point which actually breaks the application
- for the overflow issue - you can consider checking the operation's length and either making its font size smaller using JavaScript or just returning the function if the value is too long
That's all from my side, hope it helps. Happy to hear that you had a lot of fun making this project, it's a exercise.
Happy Coding!
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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