Skip to content

Commit 1cffc46

Browse files
committed
Add dollar signs to amount values
1 parent 7342df7 commit 1cffc46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ calculateButton.addEventListener("click", () => {
99
let totalAmount = amount * (1 + tipPercent / 100); //get total billing amount
1010
let tipAmount = amount * (tipPercent / 100); //get tip amount
1111
outputText.innerText = `
12-
Total Amount: ${totalAmount.toFixed(2)}
13-
Tip Amount: ${tipAmount.toFixed(2)}
12+
Total Amount: $${totalAmount.toFixed(2)}
13+
Tip Amount: $${tipAmount.toFixed(2)}
1414
Tip Percent: ${tipPercent}%
15-
Bill Amount: ${amount.toFixed(2)}
15+
Bill Amount: $${amount.toFixed(2)}
1616
`; //set output text area to format total billing amount, tip amount, tip percent and bill amount
1717
});

0 commit comments

Comments
 (0)