title: Do browsers execute loaded scripts in a single thread?
body: <p>I can write the following:</p>
  
  <pre><code>&lt;script src="file1.js" defer&gt;&lt;/script&gt;
  &lt;script src="file2.js" defer&gt;&lt;/script&gt;
  &lt;script src="file3.js" defer&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Which means files can be downloaded in parallel but executed only one after another. However, I can add <code>async</code> attribute to allow browser execute code in a random order.</p>
  
  <pre><code>&lt;script src="file1.js" async&gt;&lt;/script&gt;
  &lt;script src="file2.js" async&gt;&lt;/script&gt;
  &lt;script src="file3.js" async&gt;&lt;/script&gt;
  </code></pre>
  
  <p>If I'm interested in the performance boost, can the second block be executed faster? As I see it if a browser executes all JavaScript in one thread, then the total execution time for 3 scripts will be no different from the first block, only the order of execution may be different. Am I right?</p>