Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

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");

*Notes:*
** In three scanAndPay(item, value) u can replace the values in the instruction as like 50 , 30 , 100 **
** In orderFood("Pizza") it may be work if it shows error change as *** orderFood("Burger") or another one *** change it ***
3 years ago
Please anyone answer this one.
3 years ago
Thank you so much
3 years ago
please help me I'm stuck in the lesson.
3 years ago
let x = 10;
let y = 1;
let z;
//your code here
(x > y)? z=x : z=y;
console.log("the value of z: " +z);

I'm confusing what to do, please explain the correct answer. Thank You!
3 years ago