title: Getting Length of Object in Javascript / jQuery
body: <p>I am trying to set up an array in jQuery and I then need to do a for loop on it. But it seems that I cant use an associative array for some reason?</p>
  
  <pre><code>var items = new Array();
  items['foo'] = 123456;
  items['bar'] = 789012;
  items['baz'] = 345678;
  items['bat'] = 901234;
  alert(items.length);
  </code></pre>
  
  <p>This is just a test, but it return 0?</p>