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 trialJonatan Luna
2,554 PointsREALLY HELP!!! I dont really undesrtan the task
I don´t know how can do it?
function returnValue (width, length){
var echo = returnValue (pepe);
return echo;
}
returnValue(pepe);
<!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
Amrit Pandey
17,595 Pointsfunction returnValue (arg){
return arg;
}
var someVariable = returnValue("Some String");
Jonatan Luna
2,554 Pointstks so much
Amrit Pandey
17,595 PointsIf you can mark it as a Best Answer that'll be helpful :)
Gustavo Winter
Courses Plus Student 27,382 PointsGustavo Winter
Courses Plus Student 27,382 PointsHello jonatan, the objective of the task is: "This isn't that useful of a function, but we want to make sure that you know all of the important parts of creating a function that can accept parameters when it is called, before moving on to bigger functions."
Your code is:
You need this :
In your code above, you made two returns and assign a "var echo", This is not necessary once the task only ask for an immediately returns.
If it is helpful let me know, Or if you have any questions, please let me know.