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

what am I doing wrong

what did I miss

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


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">
    <meta charset="utf-8">

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

<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