We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7342df7 commit 1cffc46Copy full SHA for 1cffc46
main.js
@@ -9,9 +9,9 @@ calculateButton.addEventListener("click", () => {
9
let totalAmount = amount * (1 + tipPercent / 100); //get total billing amount
10
let tipAmount = amount * (tipPercent / 100); //get tip amount
11
outputText.innerText = `
12
- Total Amount: ${totalAmount.toFixed(2)}
13
- Tip Amount: ${tipAmount.toFixed(2)}
+ Total Amount: $${totalAmount.toFixed(2)}
+ Tip Amount: $${tipAmount.toFixed(2)}
14
Tip Percent: ${tipPercent}%
15
- Bill Amount: ${amount.toFixed(2)}
+ Bill Amount: $${amount.toFixed(2)}
16
`; //set output text area to format total billing amount, tip amount, tip percent and bill amount
17
});
0 commit comments