Help me im stuck


SyntaxError: Unexpected string

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

 function foodDemand("pizza");



function foodDemand("pizza");

calling a function doesn't require the function keyword


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


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



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