title: Create variables from array values in Javascript
body: <p>I have the below array with values </p>
  
  <pre><code>Na = [8289,92198,820624,84225,55775,98679,76317,8621,75928]
  </code></pre>
  
  <p>What I am expecting is 9 variables to be created as there are 9 values in this array. These 9 variables have to be dynamically created, as the values in the array changes.</p>
  
  <p>Below is what I tried, but no luck.</p>
  
  <pre><code>for (var i = 1; i &lt; na.length; i++) {
      window["na"+i] = new nas();
  }
  
  logInfo("na7" + na7);
  </code></pre>