Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

In the level 8 / lesson 11 i can't solve the problem

function scanAndPay(item, amount)
{
console.log("Welcome to scan and pay service");
console.log(`Payment of ${amount} done for purchasing ${item}.`);
}
function orderFood(item)
{
switch(item)
{
case "Burger":
let burgerAmount = 50;
scanAndPay(item, burgerAmount);
break;
case "Cold Drink":
let coldDrinkAmount = 30;
scanAndPay(item, coldDrinkAmount);
break;
case "Pizza":
let pizzaAmount = 100;
scanAndPay(item, pizzaAmount);
break;
}
}
orderFood("Pizza");
solve the above code.
by

0 Answers

No Answer posted yet.

Login / Signup to Answer the Question.