title: Perform actions as promises get fulfilled using Promise.all()
body: <p>I can asynchronously resolve a bunch of promises with <code>Promise.all(array)</code>. However <code>.then()</code> will run only after all those promises have been resolved. How I can perform actions as the promises get resolved?</p>
  
  <p>For example, I want to load all paragraphs from an article asynchronously using <code>Promise.all()</code> - This way the network requests all fire at once. If paragraph 1 is done loading, I want it to render to the page - but only if it is done loading before paragraph 2, then I want paragraph 2 to load. If paragraph 3 is done loading and 2 is not, I want 3 to wait for 2 before rendering to the page. And so on.</p>
  
  <p>I tried something like this but I don't know what to do next:</p>
  
  <pre><code>var getStuff = function(number, time){
    return new Promise(function(resolve, reject){
      window.setTimeout(function(){resolve(`${number} - Done.`)}, time);
    });
  };
  
  Promise.all([ getStuff(1, 200),
                getStuff(2, 100),
                getStuff(3, 250),
                getStuff(4, 200),
                getStuff(5, 300),
                getStuff(6, 250),
                getStuff(7, 5000)])
  .then(function(data){
    console.log(data);
  });
  </code></pre>
  
  <p>How can I get the console log of the data to happen one after another - without resolving each promise with a <code>then()</code> before making the next request? Is there a better way to do this?</p>