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

NOT ABLE TO SUBMIT THIS CODE.

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":
scanAndPay("Burger,50");
break;
case "Cold Drink":
scanAndPay("Cold Drink,30");
break;
case "Pizza":
scanAndPay("Pizza",100);
break;
}
}
orderFood("Pizza");

ERROR : COMPLETE THE CASE FOR ORDERING A BURGER.
by

3 Answers

kshitijrana14
Please send level id and lesson id
iamabhishek
It's Level 8 Lesson 11 of Javascript
kshitijrana14
Try this one :

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":
scanAndPay(item,50);
break;
case "Cold Drink":
scanAndPay(item,30);
break;
case "Pizza":
scanAndPay(item,100);
break;
}
}
orderFood("Pizza");

Login / Signup to Answer the Question.