title: Whats the smartest / cleanest way to iterate async over arrays (or objs)?
body: <p>Thats how I do it:</p>
  
  <pre><code>function processArray(array, index, callback) {
      processItem(array[index], function(){
          if(++index === array.length) {
              callback();
              return;
          }
          processArray(array, index, callback);
      });
  };
  
  function processItem(item, callback) {
      // do some ajax (browser) or request (node) stuff here
  
      // when done
      callback();
  }
  
  var arr = ["url1", "url2", "url3"];
  
  processArray(arr, 0, function(){
      console.log("done");
  });
  </code></pre>
  
  <p>Is it any good? How to avoid those spaghetti'ish code? </p>