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 trialM Robering
9,192 PointsStoring returned value inside variable
It seemed pretty straightforward but apparently I've made a mistake somewhere. At this point I have no clue what exactly I'm doing wrong. I've tried to put the variable inside the function but that doesn't work either. It keeps saying that it doesn't look like I'm storing the returned value in the echo
variable.
2 Answers
Jeff Wilton
16,646 PointsYou are just supposed to assign the value of echo to the value returned by the function. It should look something like this:
function returnValue(anything) {
return anything;
}
var echo = returnValue("Hey!");
M Robering
9,192 PointsIt worked, thanks! :)
Mike Rogers
5,280 PointsMike Rogers
5,280 PointsCan you post your code?