What am I doing wrong?


#1

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

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

#2

remove the ; between (food) and { and don't forget to close the function.


#3

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