JavaScript semicolon problem?
Hey there, I'm just learning JavaScript and apparantly on my code there is a missing semicolon before my foodDemand chocolate line.
// 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);
};
foodDemand chocolate
Please could you tell me what I have done wrong,
Thanks
Comments
you have written the last part wrong.. FoodDemand chocolate.. should be
foodDemand(chocolate);