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 trialJason Styron
Courses Plus Student 955 PointsI do not understand this challenge, I have tried it multiple times and for some reason task 2 is not clicking with me.
function returnValue(time){ var echo = ( time + 'minutes to my house'); return time }
???
function returnValue(tripmileage){
var echo = returnValue;
return tripmileage
}
returnValue('20 + 30');
<!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>
1 Answer
Ryan Navarro
13,889 PointsThe challenge is having you assign the variable the function with the parameters
var echo = returnValue("20+30");
Anthony Collier
101 PointsAnthony Collier
101 PointsJust to piggyback off this. The challenge is requiring you to assign the variable after the function. Not inside the function.