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 trialstephenallison
8,559 PointsStuck on Challenge in Javascript
Not sure what I'm doing wrong to receive an error. But the way I currently have my code, makes the code from challenge 1 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>
2 Answers
Jorge Valerio
Front End Web Development Techdegree Graduate 24,696 Pointsdelete <script> alert("I DID IT"!); </script> from you index.html file and then and then click on your shout.js file and write ---> alert("I DID IT"!);
andren
28,558 PointsYou might want to thoroughly read over the challenge text one more time:
Inside the shout.js file, write the code for an alert dialog with the message 'I DID IT!'
Your alert code is fine, but you have embedded it in the HTML file which is not what the challenge is asking you to do. There are two files in the workspace, index.html and shout.js. The reason why you were asked to link to the shout.js file in the first task is so that you can place your JavaScript code in that file.
CLAPOS ZIWEWE
9,529 PointsBRILLIANT ANSWER ANDREN