11. Functions Recap


var nameString = function (name)
return "Hi , I am" + " " + name;
nameString = (Susie);
console.log (nameString);
This is my code, but for some reason it says "ReferenceError: Susie is not defined"

nameString = (Susie)

is assigning a value to the nameString, this is incorrect.
if you want to output a function then look the example:

var test = function ( parameter ) {
    return "I am a " + parameter;
I am a banana


I fixed what you said:

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

but now I get the error: Oops, try again. Hmm, it looks like your nameString() function doesn't return 'Hi, I am Susie' for the name Susie.


try below

var nameString= function ( name ) {

return "Hi, I am " +name

var xx= nameString("Susie");


That is right, codecademy is very strict sometimes on its strings. Your code has a space between "Hi" and a comma, fix that like @h0555923363 said and you should be all done with this one. Next time just copy paste the string so you know you are not doing any mistakes on that part. :relaxed: