Our tip calculator application is almost complete. Our function named
updateValues() will fetch the values that were input by the user.
At that point, the values are passed as arguments to two functions named
calculateTotalPerPerson(). The values that are returned by each function are used to update the DOM.
- Define both required functions:
- Each function should accept the 3 arguments being passed to them within the
- Using those values, calculate and return the appropriate answer.
- Extra credit: Properly round the dollars and cents that are returned by your functions.
- Search Google for "Tip Calculator" to see the desired functionality for this application.
calculateTotalPerPerson()function should return a value that includes the tip.