title: Parallel operations with Promise.all?
body: <p>I'm led to believe that Promise.all executes all the functions you pass it in parallel and doesn't care what order the returned promises finish.</p>
  <p>But when I write this test code:</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-js lang-js prettyprint-override"><code>    function Promise1(){
          return new Promise(function(resolve, reject){
              for(let i = 0; i &lt; 10; i++){
                  console.log("Done Err!");
              }
              resolve(true)
          })
      }
      
      function Promise2(){
          return new Promise(function(resolve, reject){
              for(let i = 0; i &lt; 10; i++){
                  console.log("Done True!");
              }
              resolve(true)
          })
      }
      
      Promise.all([ 
          Promise1(),
          Promise2()
      ])
      .then(function(){
          console.log("All Done!")
      })</code></pre>
  </div>
  </div>
  </p>
  <p>The result I get is this</p>
  <pre><code>Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done Err!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done True!
  Done!
  </code></pre>
  <p>But if they're running in parallel wouldn't I expect them to be executing at the same time and give me a result like this?</p>
  <pre><code>Done Err!
  Done True!
  Done Err!
  Done True!
  Done Err!
  Done True!
  Done Err!
  Done True!
  Etc. Etc.?
  </code></pre>
  <p>Or am I missing something in the way I'm doing it?</p>