Instead of adding JavaScript directly, we're connecting the HTML file to a JavaScript file with the instructions inside there.

To include a script, the opening script tag needs a src attribute.

<html>
<body>
  HTML code goes here
  <script>console.log("JavaScript goes here");</script>
</body>
</html>]]>

Make sure to add src="script.js".