Need help with 4/13


#1

I keep getting an error that there is a problem with my Syntax.
Here is my code

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

What did I do wrong?


#2

You have typo in the word function here:

And you have to change the parameter - use food instead of Pizza in the brackets.


#3

Alright. I did it but its still not working.


#4

Are you sure that your first row looks like that:

var foodDemand = function(food) {

Is there any error? Share your new code here.


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

foodDemand("Pizza");

The solution from julietaatanasova is correct.


#6

Here is my code and its not working.
var foodDemand = fanction(food) {
console.log("I want to eat"+" "+food);};
foodDemand("Pizza");


#7

You have typo in the word function again... Use function instead of fanction.


#8

Alright, that worked. Thank you for your help.