tip-app-calculator with pure javascript
Design comparison
Solution retrospective
In this project, i styled the Tip calculator to perform a calculation after having entered firstly the amount of Bill and selected the interest hike(select Percentage) secondly. The results obtained are correct whatever number of people i entered thirdly in the field matching.
But When a new calculation considering the same amount of Bill but a new Select Tip Percentage choosed , the result obtained is wrong. Because it is taking in account the previous select Tip rather than the new, to perform the desired calculation.
let's see the flow:
1/ 1st Move
inputNumberBill(Yes)
------> selecTipChoosed(Yes)
------> inputNumberPeopleWhatever(Yes)
------> Result : **correct**
1/ 2nd Move
peviousInputNumberBill(Yes)
------> newSelecTipChoosed(Yes)
------> inputNumberPeopleWhatever(Yes)
------> Result : **Wrong**
<here is the issue faced>
Food in kettle
i want to improve the workflow of my tip calculator in a way that it could perform the second Move getting through the **right result**
( not to burnt foods)
Thanks you Guys ./
Community feedback
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