"You did not declare foodDemand!" /4 How does a function work?


#1

Hi,

When I put this code, it says:"Oops, try again. You did not declare foodDemand!"

// Write your foodDemand function below.
// Last hint: In your reusable block of code, end each line
// with a semicolon (;)
var foodDemand = function (food)
{console.log("I want to eat" + " " + food)};

foodDemand = ("Korean");

#3

@mariamariiia your problem here is when you call a function this is the syntax:

functionName()

So if i implement that to your code your calling should be:

foodDemand("Korean")

Have a Happy Early New Year!! :fireworks:


#4

Hi. Your answer was very helpfull to me as well. Thanks