#4 whats wrong?



what am i doing wrong! stuck thingy dosnt help!

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


For starters...

Declare your function and call it foodDemand.

Check the name of your function.

You can call the parameter anything you like. But we'll call it food because that is the thing that is going to change each time we call the function.

A parameter takes the form of a variable, not a string.

... function (food)

Suggest remove the code you have and start over. Read the instructions carefully and don't draw upon the example for anything other than something to look at. Forget the whole "functionName" thing.


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