[Solved] 5 Tying it All Together--SyntaxError: missing ) after argument list


#1

It says: SyntaxError: missing ) after argument list.

Here is my code:

var greeting = function(name) {console.log(name);}

greeting("Jane"; )

Note that there is not actually a space between the last semicolon and the ) in my code; the forums turned it into :wink: so I put one there.


#2

var greeting = function(name) {
  console.log(name);
}
greeting("Jane");

Doesn't matter, you can't put ; before you closed that ). That was your problem.


#3

You mean on the bottom one?

That worked. Thank you! :grin:


#4

Yup. You put ; inside the bottom one function call. :slightly_smiling: