title: jQuery: Wait till multiple GET requests are successully processed
body: <p>I need to issue multiple $.get requests, process their responses, and record the results of the processing in the same array. The code looks like this:</p>
  
  <pre><code>$.get("http://mysite1", function(response){
    results[x1] = y1;
  }
  $.get("http://mysite2", function(response){
    results[x2] = y2;
  }
  
  // rest of the code, e.g., print results
  </code></pre>
  
  <p>Is there anyway to ensure that all the success functions have completed, before I proceed to the rest of my code?</p>