I'm stuck on 04/5 "How does a function work?"


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

---I type the exact same thing above, But it gives me syntax error.
I understand how a function works and I think my code is correct but It gives me syntax error everytime I type that.


Remove quotation marks " " around your paramter food here,


Ah, I can't believe I was making a mistake there. Thanks for your help. :smile:


You're welcome :slight_smile:


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