title: async.eachSeries in node.js
body: <p>I have a loop in <code>node.js</code></p>
  
  <pre><code>for (var i in files){
      var all = fs.readdirsync("./0");
      async.eachSeries(all, function(item){
          check(item); 
     }
  }
  </code></pre>
  
  <p>The <code>check(item)</code> has a callback to another function.</p>
  
  <p>As I can see, the <code>async.eachSeries</code> doesn't execute synchronously. The loop continues to execute the other items, before the callback in the <code>check()</code> function is finish.</p>
  
  <p>How do I make the loop wait until the iteration is finished (including the callback)?</p>