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 trialMarino Carranza
Courses Plus Student 851 Pointswhy is task number 1 no longer passing?
I have gone back a couple times and rewrote the code but it still not passing, what am I doing wrong?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="shout.js"></script>
<script>
alert("I DID IT");
</script>
</body>
</html>
4 Answers
Marino Carranza
Courses Plus Student 851 PointsThanks very much, I got it! I was not looking the whole picture
Steven Parker
231,275 PointsThe task 2 code should all be in shout.js (the other tab).
Instead of adding another set of script tags along with the script code to the HTML, you should place only the script code in the other file.
The line you added in task 1 will cause the other file to be loaded.
Eloy Hernandez
4,417 PointsMaybe you need to remove the second script tags, the one with the alert on it.
Alexander La Bianca
15,959 PointsHi,
You need to add the alert inside the shout.js file. You are loading the shout.js file into the html via the
<script src='shout.js' type='text/javascript'></script>
This tells the index.html file to go look inside the shout.js file to execute any javascript. So anything that is inside the shout.js file will be loaded when the interpreter sees the above script tag So inside shout.js go
alert('I DID IT');
Alexander La Bianca
15,959 PointsAlso note: this will greatly help in keeping your code organized.