Problem declaring function


#1



Oops, try again. You did not declare foodDemand!


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


#2

a function call:

foodDemand = ("Ice Cream");

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


#3

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


#4

Yeah I just found that out


#5

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