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-app Public

Yordan 160

@Frame993

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

P

@tatasadi

Posted

Hey there,

Great job on your project! To calculate the total money that each person should give, including their share of the tip, you can use the following approach:

const calculateTotalPerPerson = (billAmount, tipPercentage, numberOfPeople) => {
  const totalTip = billAmount * (tipPercentage / 100);
  const totalAmountDue = billAmount + totalTip;
  return (totalAmountDue / numberOfPeople).toFixed(2);
};

This function will help ensure that your calculations are accurate, enhancing the functionality of your app. Keep up the great work, and continue refining your skills with these practical applications!

Marked as helpful

0

Yordan 160

@Frame993

Posted

@tatasadi thanks for the support, I really love this journey Im getting into, the changes will be ASAP

0

@MuhammadZariyanAsif123

Posted

Hi,

There is an issue in the "Bill" and "Number of People" fields. In your case, the user can enter the negative values inside the fields which is wrong.

Marked as helpful

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