Confused on "Functions recap"


Name: "Functions recap"

I am not sure if I fully understand this...


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



Hi, I am undefined
Hi, I am Susie


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


For our purposes (and throughout this course) we only name a declared function, not a function expression.

var nameString = function (name) {

There may simply be no error message other than the one given.

This is the result of calling the function with no argument. name is undefined in that instance.

nameString("Wee Gillis");




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