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 trialjames mchugh
6,234 Pointsnot sure what it is asking for
I'm suppose to create new var named echo and store the value of the results of returnValue. Then call the return value with a string of my choosing. It is telling me that I'm storing the returnValue in echo. I thought that's what I'm suppose to do. I'm not sure what it's asking for or what it is suppose to do.
function returnValue(length) {
return length;
}
var echo = (returnValue);
returnValue('read');
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
2 Answers
Agnes Demes
6,613 PointsHi, in the var echo declaration use the string marks. var echo = returnValue('length');
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsMaybe this can help you with the last part:
function returnValue(length) {
return length;
}
// var echo = your-function-name-here(value-of-argument-here);
That's all you need to do.
james mchugh
6,234 PointsHenrik, Thanks for your help. I was adding to much code and not the equals sign.
james mchugh
6,234 Pointsjames mchugh
6,234 PointsThanks Agnes that worked. I was over thinking it, and adding more lines of code than needed.