What am I doing wrong ? 4/13


#1

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


#2

@1509816 here

Edit:

var foodDemand = function (food){ //take out the semicolon here
    console.log("I want to eat" + " " + food);
};

#3

It keeps saying "Oops, try again. You did not call foodDemand!"


#4

To call the function all you have to do is write something like

foodDemand("Pizza and Chips");

Made an edit to post 2


#5

It keeps saying this, is it a bug?


#6

This is what your code should look like

// Here you define and implement the function
var foodDemand = function (food){ //take out the semicolon here
    console.log("I want to eat" + " " + food);
};

// Now you call the function
foodDemand("Pizza and Chips");

The food value inside the console .log() must not be in quotes because we want print whatever the user passes as an argument to foodDemand


#7

Thank you VERY much!!!!! I cant believe I didn't realize that, Thank you again


#8

Thanks. your help saved my day :smiley: