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 trialbhupendra rana
Courses Plus Student 5,610 Pointsfunction greeting( name ){var message="Hello "+ name;----------;}Q. how does function return message value???? Help plea
function greeting( name ) { var message = "Hello " + name; --------; }
Q. how does the fucntion returns the messge vlaue?
2 Answers
Antony .
2,824 PointsAlso when asking a question please use the title as your inquiry and the description for anything else you need to include. Here I'll add a reference to the Markdown Cheatsheet to format your code in the description area. https://teamtreehouse.com/community/howto-guide-markdown-within-posts
Antony .
2,824 PointsUse the return
statement at the end of the function. It should look like this:
function greeting(name) {
var message = "Hello " + name;
return message;
}
bhupendra rana
Courses Plus Student 5,610 Pointsbhupendra rana
Courses Plus Student 5,610 Pointsthanks my browser wasnt working.
Antony .
2,824 PointsAntony .
2,824 PointsNo worries