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 App - Vite App

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi, any advice you can give me to keep improving.

Community feedback

@Mazz100

Posted

Hey. I just finished mine and would like to give a few suggestions.

  • Firstly just like @Dimitar mentioned you need to display an error text like it's in reference and I achieved that with conditional rendering.

  • For me I wanted to cap the digits because it makes no sense to insert hundreds of them so a simple bill.length can do the trick and then set it back to empty strings.

  • Lastly if you want you could make a condition so the results doesn't render unless both bill and people are not 0.

Marked as helpful

0

@mitkokazakov

Posted

You should check if the number of people is 0 or less and display an error message above the input field. It could be done with oninput event which will be triggered every time when the user enter a number in the field.

Marked as helpful

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