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 trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript Link to an External Script

Teacher Russell
Teacher Russell
16,873 Points

What are they asking for?

I don't know what else they're asking for.

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
  <script>
<script src="shout.js"></script">
  </script>

</body>
</html>
shout.js

Rob Hudson
Rob Hudson
4,292 Points

You have two pairs of script tags bud. The one without the link to the file that you use first would enable you to write your JavaScript inside of that directly into the HTML document. The <script src> tag is a link to an external document that contains the JavaScript. Because you put your linked script inside the original script tags this will not work.

2 Answers

All you need to do is remove the <script></script> tags surrounding your script src tags. You also have a little typo at the end of your closing tag.

Charley Montgomery
Charley Montgomery
9,372 Points

You appear to have accurately understood what the question is asking. However, you made a small syntax error by including a " mark at the end of your closing script tag, example: </script">. This: <script type= "text/javascript" src="shout.js"></script> should work fine.