Tip Calculator App

Solution retrospective
I am most proud of making everything interactive. I also used Sass/SCSS for the first time, but next time, I think I will avoid it until I gain a better understanding of it.
What challenges did you encounter, and how did you overcome them?The main challenge was putting everything together for interactivity. I overcame this by breaking the project into smaller parts to understand what I was trying to accomplish. I also referred to JavaScript resources to help me apply the necessary elements.
What specific areas of your project would you like help with?Any feedback is welcome, but I am especially open to input on JavaScript, as I am still learning and find some parts challenging.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Abdulgafar-Riro
Peer Review:
This is a well-structured and readable implementation of a tip calculator with thoughtful input validation and responsive UI interactions. Event delegation is clean, and user experience is enhanced by error messaging and real-time calculations.
Strengths:
- Clear separation of concerns (input handling, calculations, reset).
- Good use of
trim()
andparseFloat()
for robustness. - Real-time validation and feedback improve UX.
- Smart handling of both preset tip buttons and custom input.
Suggestions:
Consider debouncing input events to optimize performance on rapid typing. You could abstract
calculations()
parameters to avoid DOM lookups on every call. Accessibility could be improved by associating error messages with inputs viaaria-describedby
.Overall, concise and efficient—great job!
Marked as helpful
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