title: Load JS scripts synchronously
body: <p>I'm creating a pretty complex application and want all my tens of JavaScript entities definitions  to load on demand. I need to load them just before use and must ensure they've loaded prior to any callings.<br>
  Looks like the RequireJS is what i need, but I still have no idea how to use it without callbacks. I'd like to ensure (or wait for) the JS library have been fully loaded before I use it. Yes, I know the syntax of </p>
  
  <pre><code>require([&lt;js-file-name&gt;], callback)
  </code></pre>
  
  <p>, but is there any way to implement synchronous loading instead of async? It's not always possible to use callbacks. For example, if you have a loop that populates an array with the items that requires different js file to be loaded then you'll have a wrong order because different scripts loading take differebt time.</p>