Part 4. Good afternoon codemen. Kindly tell me what is wrong with my code here, its not working. Thank you


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/0/4?curriculum_id=506324b3a7dffd00020bf661#

Oops, try again.
There was a problem with your syntax.


Replace this line with your code. 

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


#2

ar foodDemand  // write var

#3

var not ar, have cut "v" un intentionally when copy pasting. Thanks


#4

So maybe its another mistake. kindly check for me.


#5

ya you missed "

console.log("I want to eat+""+food); //  "I want to eat"  //after eat need a "

#6

Have got it. Thank you for your timely assistance Codeman. It has worked. Good day


#7

But let me ask. What are the two " symbols for between the two additional signs?


#8

space.but in your code it's not working actually.because there is no space between " "
you should write like

console.log("I want to eat"+" "+food); // now see

and you can do it too like

console.log("I want to eat "+food); //a space after eat

Hope you've understand :slight_smile:


#9

Yes, thanks. But now am stuck on part 6. Kindly have a look at my code.


#10

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