Design comparison
Solution retrospective
Hello, how do you see the page on the desktop and in the mobile version?
- And how do you see my code in Javascript?
-If you can leave an opinion on the page and mainly on the Javascript code, which is what I am dedicating the most to, I would appreciate it, Thank you! Hello, how do you see the page on the desktop and in the mobile version?
- And how do you see my code in Javascript?
-If you can leave an opinion on the page and mainly on the Javascript code, which is what I am dedicating the most to, I would appreciate it, Thank you!
Community feedback
- @MaahnoorPosted over 2 years ago
hi there. great attempt at the challenge. here are a few suggestions:
-to align buttons, set grid-template-columns: repeat(3,1fr); in percentage_tip and then increase the button width to fill the grid according to your preference.
- you aren't supposed to calculate the tip for the waiter, it is to be calculated for the people paying. say the bill is $150 for 3 people dining and they choose 10% tip. the output Tip/person should show total tip (150 x 10/100) divided by number of people (3) and that would be $5 per person. the second output should show how much each person will have to pay (bill/people)+tip per person (calculated earlier) in this it would be $55
-in your js code you have added zeros to the calculated output document.querySelector('.textDiv').innerHTML = a + ',00'; document.querySelector('.secondTextDiv').innerHTML = b + ',00'; this is confusing if the result is in decimals: it shows 7.5,00 if i select 15% tip on a bill of 100 for 2 person. use a.toFixed(2); and b.toFixed(2); this function will limit the decimal to 2 places
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