Design comparison
SolutionDesign
Community feedback
- @Lescano713Posted 4 months ago
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 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