4. How does a function work?


#1



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


SyntaxError: expected expression, got keyword 'var'


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

foodDemand("Chicken")


#2

Hi you code doesn't have any error try to refresh the page ....if it doesn't work can you take sreenshot of your code?


#3

at last you miss a semicolon ;