Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJonathan Pearson
Courses Plus Student 6,704 PointsI'm having trouble with this one question on the quiz
Finish the code below, so that the function returns the message variable:
function greeting( name ) {
var message = "Hello " + name;
;
}
I know i should start out with return but i'm not sure what i should put after. I've tried message, hello + name and a few others. I'm just lost.
3 Answers
Jeremy Faith
Courses Plus Student 56,696 PointsMatt is right except the quiz already has a semicolon inserted in the form. Just type return message and it should work.
matthew kiko
11,840 Pointsreturn message
matt hunter
13,165 PointsTry return message; but remember to put a semicolon after it.
Jonathan Pearson
Courses Plus Student 6,704 PointsHey Matt thanks for replying! Unfortunately that didn't work.
Jonathan Pearson
Courses Plus Student 6,704 PointsJonathan Pearson
Courses Plus Student 6,704 PointsI can't believe I missed that! It was killing me, I kept thinking I was doing something wrong. Thanks so much!