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 whit tailwind and js vanilla

P
Smaylen5β€’ 530

@Smailen5

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


What are you most proud of, and what would you do differently next time?

I'm very proud to have written possibly good code, structured much better than my usual.

What challenges did you encounter, and how did you overcome them?

The biggest challenge was definitely how to retrieve the correct values and pass them to the function that calculates the tips. In the end, I opted to call the function on every input:

  billNumber = Number(event.target.value);
  calculate();
});

To prevent it from being executed when the values are not ready, I used an if statement:

if (billNumber && tipNumber && peopleNumber)

What specific areas of your project would you like help with?

For the custom button, I always used type='radio'. I think I could simply use type='number'.

Community feedback

shalriβ€’ 600

@shalri

Posted

Good job on the design sir! Although, the Custom tip is not working as expected the rest of the app is working properly.

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