3.Function Syntaz



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");



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



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


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



Nevermind, I got it. Thanks!


Here also:

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

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


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")


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