1️⃣ Tip Calculator
-
Ask the user for bill amount and tip percentage.
-
Calculate the tip and total bill.
-
Show the result in an alert.
Skills: variables, numbers, arithmetic, prompts.
let billamount = Number(prompt("Enter your bill amount"));
let tippercentage = Number(prompt("Enter your tip percentage"));
let actualtip = billamount * (tippercentage / 100);
let actualbill = billamount + actualtip;
alert("Your bill is " + actualbill + " and your tip is " + actualtip);
