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 trialFabrice Innocent
Full Stack JavaScript Techdegree Student 9,715 PointsSo for the second part of this challenge..I can't seem to grasp what it is I'm missing/doing wrong Any help?
I'm not understanding why i'm getting this particular error message
function returnValue(lit) {
var value = lit;
return value;
}
function returnValue(peace) {
var echo = returnValue(peace);
return echo;
returnValue('echo');
}
<!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
Unsubscribed User
Front End Web Development Techdegree Student 33,900 PointsHi Fabrice,
for the first part of the code challenge you can make the code easier: You don't need to create a variable and reassign the parameter/argument to the variable. You can just return the the argument like this:
function returnValue(number) {
return number;
}
In the second part of the challenge you then need to create a variable named echo (OUTSIDE of the function) and assign the value with the function. For the function parameter you can pass any number or string.
Makes sense?
Try a bit and if you still need help feel free to ask again!
Happy coding,
Nils
PS: You can upvote my post and/or mark as "best answer" (at the bottom of my post) if it helped you. :-)
Fabrice Innocent
Full Stack JavaScript Techdegree Student 9,715 PointsFabrice Innocent
Full Stack JavaScript Techdegree Student 9,715 PointsTHANK YOU NILS!
Unsubscribed User
Front End Web Development Techdegree Student 33,900 PointsUnsubscribed User
Front End Web Development Techdegree Student 33,900 PointsVery welcome! :-)