tip calculator app

Solution retrospective
Any Feedback is much appreciated, Also please help me solve the following problems -
What is the "Total / person" represent, I don't have any experience tipping. so, I simply made it to be the product of "tip / person" and "no of people". However in doing so, the default value miss-match. It is wrong, I assume. So, please correct me and let me know what does it refers to.
Also how do I do something like this, with "this" operator - htmlElement.addEventListener("keyup", () => { myFunction(htmlElement) }); function myFunction(thisElement) { thisElement.value = something; }
Thank you.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ChamuMutezva
So a bill of $100 is presented for a meal in a restaurant for you and your friend. Both of you have agreed to share equally the bill plus the generous tip you are going to give the waiter. Let's say you agreed on a 10 percent of the bill to be the tip. The total tip is $10.
tip/person is $5
and the share of the bill is $50.total/person is $55
That is how I would work it
Marked as helpful - @afrussel
Hi, Using a default value on input is not a good idea may be.
- The main container is not center aligned
- After body tag make this
<main class="page">
instead of div using main
- @uiGuys
JS not working in my PC. Without having refresh its not working most of the time
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