Need Help with 4/13 JS


Its saying syntax error.
wHERE IS THE ERROR. plz help

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



var foodDemand=function("food")

your parameter can't be a string, it should be a variable


this doesnt work.


Do you mean you used just that line that @stetim94 provided? You need to use the rest (in the {} ) too.


the code i provide is just to show what line the learner goes wrong, then i explain why he goes wrong, you still have to apply the fix (helping and providing the solution are two different things)

So yes, if you copy paste, that indeed won't work.

If you need help, please go here and make a new topic (fill in the template so we have the information needed to help you)


when it is not a string, it asks to make var foodDemand a string?


or rather, it says its not in quotes


please follow the above advice.


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