Hi!
Why do I need "name " again in BODY?
var nameString = function (name) {
return "Hi, I am" +" "+name;
};
nameString("Alex")
console.log();
Hi!
Why do I need "name " again in BODY?
var nameString = function (name) {
return "Hi, I am" +" "+name;
};
nameString("Alex")
console.log();
HI your function has as argument name so when you you put
return "Hi, I am" +" "+name;
and you call you function with your name
nameString("Alex")
it will output
"Hi, I am Alex"
your name inside the call function will take the place of the argument name
HOpe that make you understand it.
OK, now I got that name is parameter and then when I call a fucntion
…
nameString (“Alex”)
…
it puts “Alex” instead of name in body,right? And why I put blank quotes there? is it cause string should be in quotes? and parameter not?
The blank quote is for putting the space between …am and Alex
the don’t need of it " " around
Are you working in codeacademy or just helping ? I just wanted to contact codeacademy with some offer
No, I just helping you but you could create a new topic with your offer in this session https://discuss.codecademy.com/c/Codecademy-Community-Lounge