Submitted almost 3 years ago
Tip calculator app challenge hub using Flexbox and Grid
@Alone-07
Design comparison
SolutionDesign
Solution retrospective
Feedbacks are Highly Recommended
Community feedback
- @sandrj1Posted almost 3 years ago
Hello! 👋 Everything looks nice! I would only suggest two things:
- You could use <input type="number"> instead of <input type="text"> so the user won't be able to type strings and you would avoid displaying "$NaN" as your result.
- When the number of people is 0, I would add a control so that your output will never show "$Infinity".
For example, you could add this to your code:
If (peopleValue > 0) {
tipAmount.innerText = totaltip; personAmount.innerText = person;
}
Hope this helps! You did a really good job :)
0@Alone-07Posted almost 3 years ago@sandrj1 Thanks for your feedback. I'll change what you mentioned.
Again, Thank You!!!
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