thanks!


On Wed, Mar 13, 2013 at 12:26 AM, Dan Stillman <notifications@github.com>wrote:

> In NCBI PubMed.js:
>
> >
> >  	//handle journal articles
> >  	var articles = ZU.xpath(doc, '/PubmedArticleSet/PubmedArticle');
> > -	for(var i in articles) {
> > +	for(var i=0, n=articles.length; i<n; i++) {
>
> See zotero/zotero#224 <https://github.com/zotero/zotero/issues/224> for
> the relevant discussion.
>
> But for anything except for huge arrays, it really doesn't matter, and, in
> our closed environment (where we know that nothing has extended Array) I
> don't think there's any reason to avoid for...in, which makes the code a
> lot cleaner. We definitely shouldn't change existing non-huge loops just
> for the sake of it. (for each...in was technically part of E4X and may go
> away at some point, though that removal is currently WONTFIX.)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zotero/translators/pull/555/files#r3349021>
> .
>



-- 
Sebastian Karcher
Ph.D. Candidate
Department of Political Science
Northwestern University