Stuck in #4


#1

Help i don't know where i am stuck and please write the whole code

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

foodDemand(Fish);


#2

Hello! Your mistake is here

when you call function, you need replace name of parameter (food) to parameter's value (fish). value is string, so you need use quotes :slightly_smiling:


#3

Almost but I'd recommend using parameter for the variable here:

var foodDemand = function(food) {

and argument for the value here:

foodDemand("Fish");

So by using as many arguments in the function call as you have parameters in your function declaration you assign those values to the variables. (1. to 1., 2. to 2. aso).


#4

You seem to know what you are doing, can you help me?
var foodDemand = function(food) {
console.log("I want to eat" + " " + food);
foodDemand("Cookies");
};
Nothing prints in the console, my error message is "It looks like you didn't print anything to the console


#5

You almost got it, the problem is that the foodDemand is inside of your function. Think about it functions are some kind of programs in programs that are not run on their own but need a start command (function call) and if this command is inside the function. Well then it would need another start command, that then would create a whole mess because if keeps calling itself. Maybe read it slow to not get confused :slightly_smiling:

Short: move this line foodDemand("Cookies"); after the }; that closes the function.


#8