Consider your tip.html page from Exercise 5.9. If you enter a check amount of $17.73 and select

Question:

Consider your tip.html page from Exercise 5.9. If you enter a check amount of $17.73 and select a 15% tip, the page will report 'You should tip $2.6595.' While mathematically accurate, this amount of precision is overkill. When dealing with dollars and cents, you really want the answer rounded up to two decimal places. In this case, $2.66.

Modify your tip.html page so that the tip amount is rounded up to two decimal places. Note that to round up, you will need to use the Math.ceil function instead of Math.round (which can round either up or down, depending on which integer value is closer)?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: