title: Dynamic loading of modules from array using RequireJS
body: <p>I am working on an application using RequireJS AMD loading method.</p>
  
  <p>I have my modules dynamical picked up from a configuration file into an array</p>
  
  <pre><code>var amd_modules = ["module1", "module2","module3"]
  </code></pre>
  
  <p>now I have my requireJS code</p>
  
  <pre><code>require(amd_modules, function(result) {
  console.log("All modules loaded");
  }
  </code></pre>
  
  <p>Now, the result variable shows the first module which is "module1". How can I get other modules also into variable inside the function() parenthesis.</p>
  
  <p>For eg, </p>
  
  <pre><code>require(amd_modules, function(module1, module2, module3) { //
  }
  </code></pre>
  
  <p>I can't write the above hardcoding because the number of dynamic variables are not known until run time. Do let me know how I can catch the objects dynamically inside the function.</p>
  
  <p>Thx</p>