Help me im stuck


#1



SyntaxError: Unexpected string


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

 function foodDemand("pizza");


#2

here:

function foodDemand("pizza");

calling a function doesn't require the function keyword


#3

thanks man, i had the same problem as him, i also put pizza for food


#4

To call the function simply call the function by its name followed by string. For example,

foodDemand("pizza");


#5

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