Introduction to Functions in JS: 4. How does a function work?


#1

var foodDemand = function (food) {
console.log("I want to eat" + " " + foodDemand(1));

};

that's my code. i keep getting the error that I'm not printing to the console, not sure exactly what I'm doing wrong, any help is appreciated :slightly_smiling:


#2

HI in your console.log instead of writte foodDemand(1) you should writte just food


#3

Now I get the error that says I didn't call foodDemand, not sure what I should do


#4

and then outside that function you should call it like that foodDemand("bread") bread is the food tha will take the place of food in your console.log