title: JavaScript does anything get initialized / executed in these statements?
body: <p>I am trying to work out if the following statements actually execute JavaScript - does bundle.js run, or is it just that the functions in bundle.js get loaded ready for some later statement to execute them?</p>
  
  <p>Same question regarding var X = require('X');</p>
  
  <p>My understanding is that this loads X.js into memory but does it initialize code? Or does the var = just load functions into memory?</p>
  
  <pre><code>&lt;body &gt;
  &lt;/div&gt;
      &lt;script src="http://localhost:3000/dist/bundle.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript"&gt;
        (function () {
          var X = require('X');
          X(mountNode, endpointsRoot, locale, user);
        })();
        &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>