title: Are JavaScript functions asynchronous?
body: <p>Consider the following function being executed,</p>
  
  <pre><code>function loadPage()
  {
      takeInput();
      processInput();
      outputInput();
  }
  </code></pre>
  
  <p>In what order would they be executed(I have <a href="http://www.slideshare.net/clutchski/writing-asynchronous-javascript-101" rel="noreferrer">read</a> that it follows stack so option 2 will be the answer)?</p>
  
  <p><strong>Option #1</strong></p>
  
  <ol>
  <li>takeInput(); </li>
  <li>processInput();</li>
  <li>outputInput();</li>
  </ol>
  
  <p><strong>Option #2</strong></p>
  
  <ol>
  <li>outputInput();</li>
  <li>processInput();</li>
  <li>takeInput();</li>
  </ol>