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


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:


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


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


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