title: how do I execute something after all the callbacks are finished in javascript
body: <p>I am using google map v3 to do some address translation.
  I pass the request and callback function to <strong>Geocoder.geocode</strong>. The callback function will add a marker on the map. After all, I use <code>map.FitBounds(fullBounds)</code> to make all makers in sight, where <code>map</code> being the <strong>Map</strong> obejct, <code>fullBounds</code> being <strong>LatLngBounds</strong> obejct.</p>
  
  <p>below is piece of my code:</p>
  
  <pre><code>    for(i = 0; i &lt; requestArray.length; i ++)
      {
          geo.geocode(requestArray[i], calbck);
      }
  </code></pre>
  
  <p>My problem is that when I invoke <code>map.fitBounds(fullBounds)</code> in  <code>calbck</code>, not all callback functions have finished(always none in my observation). So how can I delay the <code>fitBounds</code> so that all callback functions have finished?</p>