#11. Functions Recap


#1

https://www.codecademy.com/en/courses/javascript-beginner-en-6LzGd/2/3?curriculum_id=506324b3a7dffd00020bf661

it is not allowing me to print "Hi, I am Susie"


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

console.log(nameString("susie"));


#2

I got it.

in the code block, when writing out the return function. Make sure the string is written like this

"Hi, I am" + " "+ name;

instead of this

"Hi, I am" + "" + name;

you want the parentheses in the string to have space between them.


#3

hey ,I got it

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


#4

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