Functions Recap printing correctly, but getting error


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


Put a space between your quotation marks.. What's the error?


OK.... i did that and refreshed the page and it prints perfectly now, but not getting the green light...?


You need to have the console.log outside the function

So after


now it's not printing the "I am Greg..." it's printing "Function"


Show me your updated code


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



This lesson is looking for the exact working
return "Hi, I am" + " " + name;

so change hi to Hi


still printing "function"...

and now it's saying that I've completed it correctly, even though it's printing "function"?

do i need console.log(nameString) inside and outside of the function?


This is correct, refresh your page and try again or reset lesson and paste in.

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



i refreshed and reset code and copy/pasted as you suggested the exact code as you've written and it's still printing "function" but i've got the green, i'm going to go with as long as i know the code is correct!
Thank you for your help..

Is this the way coding is? constant debugging and trying new angles?

it's a bit difficult when you don't if it's you or the program you are using that's not working properly..


Yes programming requires debugging, trying and testing,

Two issue's you experienced one was Codecademy's strict SCT(exact text) and the other was that the error was stored and only disappeared after a refresh.

printing "function"
I'm sorry not paying close attention what you need to do is call:



Thanks for i calling that last bit of code you sent in the function only?


Out of the function..

What it's doing is setting the name and calling it


Ok, thank you again...