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 trial

JavaScript JavaScript Basics (Retired) Creating Reusable Code with Functions Passing an Argument to a Function

Modify the returnValue function to accept one argument named value. NEED HELP

PLEASE HELP WHAT AM I MISSING OR NOT DOING> IVE BEEN STUCK FOR HOURS

script.js
function returnValue(Value) {
  return Value;
}

var echo = returnValue("Value");
index.html
<!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>

4 Answers

Takuya Hirata
Takuya Hirata
23,296 Points

Hello Jasmine, I think it is supposed to be "value" not "Value". Hope this works

Did this work for you? Having same trouble.

function returnValue (value) { returnValue; }

function returnValue(value) { return value; }

var echo = returnValue("value");

//this worked for me

Takuya Hirata
Takuya Hirata
23,296 Points

What kind of error did you get?

I just figured it out, thank you. Was stuck on this for a bit.