I don't get it what am i doing wrong:( (4)


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

// says: "you did not declare foodDemand"


from exercise 3: You can run this code by "calling" the function, like this:


now, if i look at your function call:

foodDemand = ("pizza")

it seems you try to assign something to foodDemand, and you forgot at a semi-colon at the end of the line.


i putted the semicolons but still say "you did not declare foodDemand"


semi-colons? semi-colon you mean, did you also do the other thing? can i see an updated version of your code?


Didn't close your curly bracket & forgot to print* "pizza" . Example .

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


I think it shood look like this
var foodDeman = function(food) {
console.log("I went to eat" +" "+ food);


@ivanshere, you do realize that your code is wrong?

@masterchin, yes your could works, but i was on purpose not providing a full answer, especially not without without any explanation. I wanted to help them, but let them do most of the thinking, teaches them more then a answer


you do not need an = sign when you are calling and it might make it easier if you change the console.log from food to pizza and make your called function food


you really need a 11 month old topic for this? Please don't