3/13, what's wrong?


#1

I've been attempting 3/13 for a few days now, but am stuck! I've read all the topics on this subject, copy and paste galore, but it always says "There's a problem with your syntax!"

var greeting = function("James") {
console.log("Great to see you," + " " + "James");
};
// On line 11, call the greeting function!
greeting("James");

Help!


#2

Hi , should be james


#3

Never mind, I discovered the problem!
old code:
var greeting = function("James") {
console.log("Great to see you," + " " + "James");
};
// On line 11, call the greeting function!
greeting("James");

There shouldn't be the " " surrounding the function("James"), only on the greeting("James").
Get it?


#4

Yes and neither should they sourround the James in your sentence. Maybe rename it to idk myName or something like this to get rid of the ambiguity.

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

at this points it's just a variable name that is completely arbitrary. The point where it gets its value is here:

greeting("James");