Tip calculation app with HTML5, CSS3, JavaScript(Es6)

Solution retrospective
Fixed the calculation for third time.
I hope now the logic behind bill and tip calculation is appropriate.
Thank you so much. @EduardIonescu
Please log in to post a comment
Log in with GitHubCommunity feedback
- @EduardIonescu
Hi, nice attempt at trying to solve the challenge!
The webpage works great when you only have 1 as the number of people.
The issues I'm seeing are:
totalAmount.innerHTML = $ ${parseFloat(num1*num2).toFixed(2)};
- You should try and divide the bill by the amount of people, that way you get how much each individual has to pay. Also try something like `( billValue + (billValue * tipPercentage) ) / numberOfPeople . This way the total bill includes the tip and is divided by how many people the user inputs. The same goes for the tip amount, you get it right but then you multiply it by the number of people instead of dividing.If you have any other questions, let me know and I hope this helps!
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