title: When is RequireJS' require call asynchronous? When is it synchronous?
body: <p>I use RequireJS to load my modules in one of my projects. 
  I see around the web different ways to require modules using the <code>require</code> call (and not <code>define</code>).</p>
  
  <p>Lets assume I have a module named "JQuery" and I would like to require it.
  Two ways are possible as I saw in examples:</p>
  
  <ol>
  <li><p>This:</p>
  
  <pre><code>require(["JQuery"], function($){
     $.doSomething();
  })
  </code></pre></li>
  <li><p>And this:</p>
  
  <pre><code>var $ = require("JQuery");
  $.doSomething();
  </code></pre></li>
  </ol>
  
  <p>My question is if the load is async as RequireJS documantation says it is, how can the second convention work? How can I say for sure that <code>$</code> is defined and that the first row completed before the second row executes? </p>