Javascript for loop error
<p>This is what I have:</p>

<pre><code>function get_bad_changelist_authors() {
   var changelistAuthorDivs = $('div.bad_changelist_author');
   var changelistAuthors = [];

   for (var div in changelistAuthorDivs) {
      changelistAuthors.push($(changelistAuthorDivs[div]).text());
   }

   return changelistAuthors;
}
</code></pre>

<p>changeListAuthorDivs has n elements but for some reason it iterates n+1 times and initialized div to a string (ie. the string "length") on the last iteration. On the last iteration is where this loop has its error.</p>
