title: Why does my script stop running after calling XMLHttpRequest.send()?
body: <p>I'm trying to get a handle on how the <code>XMLHttpRequest()</code> object works.  </p>
  
  <p>If I remove <code>xhr.send()</code>, <code>"hi"</code> will display.  But nothing displays when it is present.  I really want to write the <code>xhr.status</code> to the screen, but first I need to know why the script doesn't finish executing, even though the remainder does not depend on the response after <code>xhr.send()</code>.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Playground&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div&gt;
              &lt;script&gt;
                  var xhr = new XMLHttpRequest();
                  xhr.open("GET","http://www.google.com",false);
                  xhr.send();
                  document.write("hi");
              &lt;/script&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>