Problem with code


I'm in the chapter "Introduction to Functions in JS", and I don't get what I do wrong.

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

The error I get:
Oops, try again. It looks like you didn't put quotes around the food you gave foodDemand!


Your function name is foodDemand not just food.

So to call your function just add Demand to the food like,



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