Trouble w/ 4/13


#1

Hi, having trouble with this code - getting an error message that says, "Oops, try again. It looks like you didn't put quotes around the food you gave foodDemand!":

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


#2

I would suggest refreshing...


#3

Yes, you should refresh


#4

Thanks! Oddly, that worked.


#5

I'm having the same prob. When I refresh it has the same message "Oops, try again. It looks like you didn't put quotes around the food you gave foodDemand!"
Heres the code
var functionName = function(foodDemand) {
console.log("I want to eat" + " " + food); }
foodDemand ("Burrito");


#6

@incrustedmagic.

var foodDemand = function(food) { //Pay attention to this line!
   console.log("I want to eat" + " " + food); 
}; //Add a semi-colon here!

foodDemand("Burrito");

You're passing a function a parameter that it can use. A parameter is specific to that function and cannot be manipulated or used outside of the function. So in order to give a function a parameter you have to call the function by it's name. then pass it a parameter (the thing inside the parenthesis).