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

what am I doing wrong

what did I miss

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


</html
shout.js

2 Answers

Jonathan Woods
Jonathan Woods
10,137 Points

Hi there, nice attempt. Hopefully below explains and helps :)

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>

  <script src="shout.js"> </script> //script needs to be before the closing body tag

  </body>
<html>  //dont forget to close your HTML tag

The Alert is within the shout.js file that you linked in the HTML

alert ("I did It!");

that's exactly what I've done. it still won't work. I feel like i'm going blind by this. what am I missing

thank you