JavaScript JavaScript Basics 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