Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
window.onload = function() {
var number, tip, total;

alert("Let's calculate your 20% tip.");
alert("Let's calculate your 25% tip.");

baseAmount = parseFloat(prompt("How much is the bill?"));

tip = calculateTip(baseAmount);

total = calculateTotal(baseAmount, tip);

alert("Your 20% tip is: " + tip);
alert("Your 25% tip is: " + tip);

alert("Your total is: " + total);
};
Expand Down
2 changes: 1 addition & 1 deletion tip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

function calculateTip(baseAmount) {
return (.2 * baseAmount);
return (.25 * baseAmount);
}