You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letamount=parseFloat(amountInput.value);//get amount value
8
8
lettipPercent=parseFloat(tipPercentInput.value);//get tip percent value
9
9
lettotalAmount=amount*(1+tipPercent/100);//get total billing amount
10
-
outputText.innerText=`Total Amount: ${totalAmount.toFixed(2)}`;//set output text area to format total billing amount
10
+
lettipAmount=amount*(tipPercent/100);//get tip amount
11
+
outputText.innerText=`Total Amount: ${totalAmount.toFixed(2)}\nTip Amount: ${tipAmount.toFixed(2)}`;//set output text area to format total billing amount and tip amount
0 commit comments