Problem declaring function


Oops, try again. You did not declare foodDemand!

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


a function call:

foodDemand = ("Ice Cream");

doesn't require a equal sign, a equal sign means you assign.


I fixed it, the problem was that ("Ice Cream"); had to be next to foodDemand


Yeah I just found that out


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