Introduction to Functions: 4


#1

So, I couldn't get past this chapter and I can't seem to get the answer.
here's my code.

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

I keep getting the "SyntaxError: missing ) after argument list" message

any help would be helpful!


#2

console.log() is missing its closing bracket ()), the closing bracket at thend of your line is for food, not of console.log, at another closing bracket


#3

console.log("I want to eat" + " " + food);

foodDemand("Burger");

no space between the function(value)

@azumacchi here is also an example I made in jsbin

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

foodDemand("chips");

#4

Hi there and thank you for the answer. I tried putting in the closing bracket and the error this time changed to "RangeError: Maximum call stack size exceeded"


#5

Seems i missed something, see benjnev his answer


#6

It finally worked! Thank you so much for your help!


#7

It worked already. Thank you for help help as well!