11.please help


#1


11.functions recap


it says oops try again, there was a problem with your syntax


var nameString = function (name) {
return "Hi I am"  +  "  " +  name;
console.log nameString (("John"));
};


#2

Your calling nameString inside of itself so I would move it and the console.log statement containing it outside of the function; also instead of having nameString called right next to the function like you did here:

I would call it inside like this:


console.log(nameString("John"));

Hope this helped :slight_smile:


#3

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