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 trialSeth Warner
5,348 PointsWhat is wrong with my code?
It is asking to make a function named "returnValue" and give it one argument. Have the function return its self.
What do I have wrong?
Seth
function returnValue(egg) {
return returnValue;
}
returnValue(3);
<!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
Jason Anello
Courses Plus Student 94,610 PointsHi Seth,
It wants you to return the argument that was passed in.
In your case, you want to return egg
Also, you don't need to call your function yet for task 1. You only need to write the function.
Peter Smith
12,347 Pointsfunction returnValue(egg) {
return egg;
}
returnValue(3);