@EduardIonescu
Posted
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!
@Das-Dipto
Posted
@EduardIonescu Okay thank you for the suggestion, I'm coding accordingly.
Fixed it, please check it on your leisure time and give me feedback.
Thanks again.
@EduardIonescu
Posted
@Das-Dipto Hi, you did well for the total/person but you must do the same for the tip amount / person, because right now it doesn't get divided by the number of people.
After you solve that problem you should add the tip amount to the total amount, if that makes sense, since the total means the (bill+top) / people, right now you only show bill / people.
Btw about how it looks: try to give your buttons cursor: pointer
in the css to make them feel more like buttons.
I hope that helps and it's not too overwhelming haha
@Das-Dipto
Posted
@EduardIonescu Hello, Finally I made it right, I hope now the calculation is appropriate.
Sorry for replying late, I was preparing and attending my undergrad final semester exam.
Thank you very much for suggesting briefly, couple of times about the proper solution.