I need help! Introduction to Functions in JavaScript


Hi! I don't know what is wrong with the following code, but an error message keeps popping up: "SyntaxError: Unexpected identifier 'namestring'." Please help!


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


Lower and upper cases are important. You have your function name as nameString and not namestring (notice capital S -- camelCase). You also seem to be missing a closing bracket at the end.


Thank you so much, however, that did not work. I still get varying error messages. Thanks anyhow!


Your Eli is not a string. Strings are wrapped in quotation marks. You are also missing a closing bracket on the last line.


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