title: why this happened ? (javascript loading problem..)
body: <p>Description:</p>
  
  <p>i am new to trying these codes. a Javascript Hello World try.
  only Line: 6, 22,23,24 (the "script" tags) are important. 
  I refer to another js file 'a1.js'
  All contents in a1.js is only one line: "alert(1)".</p>
  
  <p>Question is: </p>
  
  <p>i click open the html file in chrome(ver 78.0.3904.108), and the RESULT confuse me:
  it's 
  popup '1', and then popup '3', and show the words Hello World in the browser.</p>
  
  <p>why I don't see alert(2) pop up?</p>
  
  <p>Can i put javacript in script tagS anywhere in html head and html body and in that order loaded?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
    
      &lt;!-- THIS IS THE WIERD PART I --&gt;
      &lt;script src="a1.js"/&gt;
      
      &lt;!-- Required meta tags --&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
      &lt;!-- Bootstrap CSS --&gt;
      &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"&gt;
  
      &lt;title&gt;Hello, world!&lt;/title&gt;
      
    &lt;/head&gt;
    &lt;body&gt;
    
      &lt;!-- THIS IS THE WIERD PART, MAYNE SOMETHING WRONG  --&gt;
      &lt;script&gt;alert(2)&lt;/script&gt;
      &lt;h1&gt;Hello, world!&lt;/h1&gt;
      &lt;script&gt;alert(3)&lt;/script&gt;
  
      
      &lt;!-- NOTHING SPECIAL IN THIS PART --&gt;    
      &lt;script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"&gt;&lt;/script&gt;
      
      &lt;!-- END --&gt; 
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>