Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip calculator

@Manuelcoder02

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@Lescano713

Posted

Your code is quite clear, but there are a few areas where you could improve it for better readability, maintainability, and performance:

Avoid Repeating Code: Many of the functions that handle different tip percentages are very similar. You could create a single function that handles the tip calculation based on a percentage.

Handle Edge Cases: Make sure to handle edge cases where input values might be invalid (e.g., negative numbers or non-numeric values).

0

Please log in to post a comment

Log in with GitHub
Discord logo

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