title: XMLHttpRequest small issue
body: <p>I want to send a request to the server, and return the response using AJAX. I know that a good method for this is using a callback, however I am curious why <code>xHTTP.onreadystatechange = function(){ ... }</code> can't access <code>_response</code> variable.</p>
  
  <pre><code>function __GET(url)
  {
      var _response;
      var xHTTP = new XMLHttpRequest();
  
      xHTTP.open("GET", url, true);
      xHTTP.onreadystatechange = function(){
          if (xHTTP.readyState == 4){
              _response = JSON.parse(JSON.stringify(xHTTP.responseText));
          }
      };
      xHTTP.send();
  
      return _response;
  }
  </code></pre>