4. How does a function work


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

I keep getting "Oops, try again. You did not declare foodDemand!" not sure what wrong here.


In calling your function you shouldn't need an equal sign just the function and the parameters so get rid of it!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.