title: how to convert Async.js eachSeries example to Bluebird Promises?
body: <p>I'm looking into Promises and wondering if anyone familiar with Async.js can demonstrate how to do the following using Bluebird promises. this is the simplest straightforward example I could think of to demonstrate Async.js eachSeries.
  For anyone not familiar with Async.js this example runs the same process on each one of the array elements, running in serial (one after the other and not in parallel), then executing code after all async operations completed.</p>
  
  <pre><code>var async = require('async');
  
  var items = [0,1,2,3,4,5,6,7,8,9]; // this is to simulate an array of items to process
  
  async.eachSeries(items,
      function(item, callback){
          console.log('start processing item:',item);
          //simulate some async process like a db CRUD or http call...
          var randomExecutionTime = Math.random() * 2000;
          setTimeout(function(index){
                          //this code runs when the async process is done
                          console.log('async Operation Finished. item:',index);
                        callback(); //call the next item function
                      },randomExecutionTime,item);
      },
      function(err){
          if(err){
              console.log('Got an error')
          }else{
              console.log('All tasks are done now...');
          }
      }
  );
  </code></pre>
  
  <p>Cheers<br>
  Ajar</p>