3.Function Syntaz


#1


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


It's telling me "Oops, try again. You did not call the greeting function. Pass it a name!"
Please help me!


var greeting = function(name) {
    console.log("Great to see you," + " " + "name");
};
sayHello("greeting");


#2

Here,

You want to greet with your name as the parameter. Here's a clue.

functionName("your_name");

#3

I've been around with it. I still get the same error.


#4

You mean you called the greeting function with your name in it and get an error still?

greeting("marisela25");

#5

Nevermind, I got it. Thanks!


#6

Here also:

name is not a string. It's an argument.

console.log("Great to see you," + " " + name);

#7

I just passed this one, but got stocked at the following one.

You call the function by typing "greeting", because this is the name of the function in these e.g.

In between the parentheses (after you called the function) you have a value, that can be any name that you want to write.

And then it will automatically add this to the PARAMETER. The holder ("Great to see you," + " " + "name")


#8

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