How does a function work? 4/13


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


// what's wrong with this code?


You put:

var foodDemand = function("food"){

In a function, you are not supposed to put a string inside the function. Instead, you have to do it like this:

var foodDemand = function(food){

Hope it helped!:smiley:


your variable function parameter should not have quotations. Seems like you got the rest of it.
see example below:

var firstName = function(name) {
console.log("My first name is" + " " + name);