Error in Printing Function; I think I did the code right, why does it print "[Function: nameString]"?


#1


var nameString = function (name){

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

};

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


#3

It's not an error message, it justsays the following:

[Function: nameString]


#4

Okay, I'm going to look at mine really quick and see what's up.
What lesson is it?


#5

Kk, thanks! :slight_smile: Lesson is Introduction to Functions in JS. Number 11. Function ReCap. :slight_smile:


#6

Okay, the mistake is in your last line. The instruction is "Call nameString() by passing it your name, and use console.log to print the output."
Basically, it wants you to put your name as a string inside of name string, and it wants you to put nameString inside of console.log like this:
console.log(nameString('Kylea'));


#7

Oh, I see, thank you! :slight_smile:


#8

Thank you...:slight_smile: Your answer is good and it helped me...


#9

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