title: I can't understand In which order will the functions foo and bar be executed?
body: <p>I can't understand In which order will the functions foo and bar be executed?</p>
  <p>1- foo and bar will execute in the same time, 2- We don't know 3-foo then bar 4- bar then foo, I think 1- but I don't sure</p>
  <pre><code>var res = {};
  
  function foo(results) {
      res.foo = results;
  }
  
  function bar(results) {
      res.bar = results;
  }
  
  // ajax (..) is some arbitrary function given by a library
  ajax( &quot;http://some.url.1&quot;, foo );
  ajax( &quot;http://some.url.2&quot;, bar );
  </code></pre>