3/11 functions recap


Hey Guys,

Need help with this problem. I get the answer that is needed "Hi, I am Susie" but it tell me that my variable "nameString" doesn't return the the answer that is needed.

code is as follows
var nameString = function (name) {
console.log ("Hi, I am " +""+ name)
nameString ("Susie")

I have tried it with a return as well and still says error, If anyone could help that would be greatly appreciated
Thanks in advance


you should use return.

then, your function call:

nameString ("Susie")

should be the argument of console.log(), so that what is returned is logged to the console


Thank you very much. It worked

Much appreciated