title: Javascript asynchronous execution: will a callback interrupt running code?
body: <p>I was just hoping someone could clarify this for me. If I have the following code running server-side with node.js, <strong>not in a browser</strong>:</p>
  
  <pre><code>console.log("a");
  db.get('select * from table1', function(result){
  console.log("b");
  });
  console.log("c");
  </code></pre>
  
  <p>Presuming the database call is asynchronous I should get the result</p>
  
  <pre><code>a
  c
  b
  </code></pre>
  
  <p>But if i were to add the following line to the bottom of my code</p>
  
  <pre><code>while(1);
  </code></pre>
  
  <p>Then b would never execute, am I right?</p>