title: Displaying very many objects - javascript
body: <p>I'm into making games with javascript and HTML5. In my previous games when I needed like 5 squares that moved around I'd do it like this.</p>
  
  <pre><code>var square0 = {
    x: 0,
    y: 0,
    side: 10,
    velX: 5,
    velY: 5
  }
  var square1 = {
    x: 0,
    y: 0,
    side: 10,
    velX: 5,
    velY: 5
  }
  .
  .
  .
  var squares = [square0, square1, ... ];
  </code></pre>
  
  <p>And then put it all in a for-loop to do stuff with it. However I learned the hard way that this becomes very inefficent if you want very many objects. How should I do this if I wanted to use like 100 squares? Any ideas? Please don't use any JQuery.</p>