Lesson #4


#1

I have read through other discussions and cannot figure out what I am doing wrong here! Please help!!!

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

Replace this line with your code.


#2

@netninja54127,
For the Javascript Interpreter the semi-colon-; is an End-of-Statement indicator.
Thus if you write

var foodDemand =function (food);

the associated code-block is NOT identified
as being part of the function-definition !!!!
Remove the semi-colon-; ...


#3

Remove this semi colon after the parameter