What Is Happening?


#1

Hi, all!

For some reason, although I seem to be coding correctly, I keep getting an error message that states that the parameter of my variable is not defined. If my parameter was DarkRytsk, it would declare, ReferenceError: DarkRytsk is not defined. I have already tried, and to suggestion, making my calling of the function all lower case, but that failed. Please help! My code is as follows:


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


#2

Eli is a name, so it should be a string.


#3

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