I'm stuck with an error


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/0/4?curriculum_id=506324b3a7dffd00020bf661


SyntaxError: Unexpected identifier


var foodDemand = function (food)// Write your foodDemand function below.
{console.log("I want to eat" + " " + food);// Last hint: In your reusable block of code, end each line
}console.log("chicken");// with a semicolon (;)


#2

So instead of console.logging it to the screen you need to call your var foodDemand instead with the chosen food in it. So for example:

foodDemand("Whopper");

#3

thanks man! it helped :slight_smile:


#4

No problem! Happy coding! :smiley:


#5

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