JavaScript tidak berjalan

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
  </head>
  <body>
    <!-- ⛔️ BAD - script is ran before HTML is declared ⛔️ -->
    <script src="index.js"></script>

    <div id="box"></div>
  </body>
</html>
Ashamed Anteater