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 trialadele wilson
Courses Plus Student 4,058 PointsI have been stuck on this task; I'd love the correct code so I can make sense out of what I am doing wrong.
The way this task is phrased, for some reason, is killing me.
function returnValue(saySomething) {
return saySomething;
}
returnValue('hi') ;
var echo = saySomething;
<!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
Tim Acker
Front End Web Development Techdegree Graduate 31,247 PointsThis is all you need to complete this challenge. You do not need to call the function. Also, your last line of code is invalid.
function returnValue (saySomething) {
return saySomething;
}
adele wilson
Courses Plus Student 4,058 PointsAh, I think i figured this out.
function returnValue(saySomething) { return saySomething; }
var echo = returnValue('hi') ;
Jason Anello
Courses Plus Student 94,610 Pointschanged from comment to answer
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsYou need to call the function for task 2.
Tim Acker
Front End Web Development Techdegree Graduate 31,247 PointsTim Acker
Front End Web Development Techdegree Graduate 31,247 PointsThanks. When I took the challenge, I only created the function and the check accepted my input.