#3 Introduction Funcion syntax help


I can seem to get it right, i do what i it says but it still says i'm wrong. I've tied in differeant ways
this was my last attempt...

var nameString = function (name ) {
return "Hi,I am" + " " + name



you need the colon after name not the curly bracket.

like this:
var nameString = function (name) {
return "Hi, I am" + " " + name;



return "Hi, I am" + " " + name;

you needed a semi colon at the end ;


I tried it and it still says this: Oops, try again. You did not call the greeting function. Pass it a name!


it's because you changed the variable name it should be

var greeting = function(name) {
console.log( "Hi, I am" + " " + name);


technically your function is good it will work just not for their test case. if you ran yours in your console using chrome developer tools it would work. It is a little off syntactically but functional as is


Thanks! Also thanks for the quick info!


no problem so did this help? if so could you hit the solution button below the response this way people know that this has been resolved!


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