title: creating objects in for loop javascript
body: <p>I hope you can help me with this hopefully stupid problem.
  I try to do the following:</p>
  
  <ul>
  <li>creating array with data</li>
  <li>looping through this array within a for loop (based on array.length)</li>
  <li>create new object based on data in array</li>
  </ul>
  
  <p>So far I got the following:</p>
  
  <ul>
  <li>create array</li>
  <li>loop through array</li>
  <li>create one object based on my constructor</li>
  </ul>
  
  <p>The problem is, the array has a length of 4 and should therefore create 4 objects but it creates only one. If I remove the creation of the object and just log "i' it works, but in the original intention it ends after the first
  The loop looks as follows:</p>
  
  <pre><code>for(i=0;i&lt;array.length;i++)
          {
          newObj[i]=new ObjectName(array[i].param1,array[i].param2,array[i].param3)
          }
  </code></pre>
  
  <p>I have no idea why it ends after the first run and I also don't get an error displayed when looking into firebug.</p>
  
  <p>Cheers</p>