title: does the callback passed to jquery's $.get() execute in a separate thread?
body: <p>Very simple question: suppose I have the following js/jquery code</p>
  
  <pre><code>doSomething();
  
  $.get(url, callback);
  
  doSomethingElse();
  </code></pre>
  
  <p>I understand that right after the GET request is sent doSomethingElse() starts being executed. Now suppose that the server's reply arrives while doSomethingElse() is executing. What happens?</p>
  
  <ul>
  <li>Does the callback run in a separate thread in parallel to doSomethingElse()? </li>
  <li>Does the execution of doSomethingElse() pause until the callback runs and returns?</li>
  <li>Does the callback only get called once doSomethingElse() has returned?</li>
  </ul>
  
  <p>Thank you for any insight!</p>
  
  <p>lara</p>