Functions Recap


#1

I'm having a problem with my codes

please help anyone that might know my problem

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

Says Syntax error PLeASe HElp Me


#2

that is not how it look on the real thing but its a example of what i did

didnt add the spacing in this post


#3

console.log() requires parentheses, its a function call

also, when calling nameString, this should happen outside/after the function given a function call executes the function


#4

thanks for the help, seems like im missing simple mistakes :smiley:


#5

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