title: How do you import a local js file into a basic html file?
body: <p>I have a very basic html file that uses a script tag to import a javascript file, but the javascript file is not run when I load the html locally in a browser. How am I formatting the script tag incorrectly?</p>
  <p>Folder Structure</p>
  <pre><code>-folder
    --test.html
    --script.js
  </code></pre>
  <p>test.html</p>
  <pre><code>&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;title&gt;TEST&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;p&gt;TEST&lt;/p&gt;
    &lt;script type='text/javascript' src=&quot;script.js&quot; /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>script.js</p>
  <pre><code>console.log('HELLO WORLD')
  
  (function () {
    setTimeout(() =&gt; alert('HELLO WORLD'), 3000)
  })();
  </code></pre>