title: function contents execution not in order
body: <p>i have a java script function </p>
  
  <pre><code>function myfunction() {
  
      var url = location.href;
      var ajaxRespose;
  
          $.ajax({
              type:"GET",
              url: url,
              cache:false,
              dataType: "text",
              success: function(response) {
                  var data = $.parseJSON(response);
                  ajaxRespose = data;
                  console.debug("ajaxRespose ==&gt;:"+ajaxRespose);
              }
          });
          console.debug("first ajaxRespose: " +ajaxRespose);
      }
      return false;
  }
  </code></pre>
  
  <p>on my console (firbug) i get :</p>
  
  <pre><code>first ajaxRespose: undefined
  
  ajaxRespose ==&gt;:[object Object]
  </code></pre>
  
  <p>My question is, why the ajax call execute after the "first" console.debug.
  PS: i have simplified the function, (function works ok, but problem is in sequence of execution)</p>