Stuck at 4


#1

i keep typing in my code and i keep getting the error message saying unexpected string...i cant see whats wrong hopefully someone here can.

// Write your foodDemand function below.
// Last hint: In your reusable block of code, end each line
// with a semicolon (:wink:

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

foodDemand("Steak")


#2

Hi remove the " " around food inside here

function ("food")

#4

What is my problem here? I can't seem to figure this one out.


#5

Here

foodDemand=("fish")

The problem is the = you dont need it just put It like that

foodDemand("fish")

#6

That was it! Thank you!


#7

i keep typing in my code and i keep getting the error message saying SyntaxError: missing ) after argument list...i cant see whats wrong hopefully someone here can.

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


#8

Hi inside your console.log you should remove the " after sweet

console.log("I want to eat" + " "+sweet");

Because it make It a string So it should be like that

console.log("I want to eat" + " "+sweet);

#9