title: Jquery execute in wrong sequence
body: <p>I have the sample as below. I always got "c" first before "a" and "b". How do I get "a","b" and "c" accordingly? I would appreciate for any advice.</p>
  
  <pre><code>b.extend({
          get: function (id) {
  
          jQuery.ajax({
              type: 'GET',
              url: url,
              data: pdata,
              success: function (result) {
                  console.log("a");
              }
          });
  
          for (var a = 0; a &lt; 5; a++) {
              jQuery.ajax({
                  type: 'GET',
                  url: url,
                  data: pdata,
                  success: function (result) {
                      console.log("b");
                  }
              });
          }
          console.log("c");
          }
  });
  </code></pre>