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 trialmouad essousy
2,187 Pointssomething weird
Hi,I put this code in the second question but it doesn't work,But it works with me in my browser. this is my code: and thnks!
function returnValue(text){
var echo = text;
return echo;
}
alert( returnValue("Hello"));
<!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
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsThey want you to create the echo variable after the function, after the closing }
, not inside of it:
function returnValue(text){
return text;
}
// create the echo variable out here
mouad essousy
2,187 Pointsmouad essousy
2,187 Pointsi have answered this first question lol i'm stuck in the second.