Closed GoogleCodeExporter closed 9 years ago
The common way of dealing with this (which has become standard Javascript
practice) is by only using Objects as associative arrays, not Arrays. There are
several reasons for this, not least of which is the behavior of for...in loops.
See, for instance, the warning at:
https://developer.mozilla.org/en/JavaScript/Reference/Statements/for...in#sectio
n_4
With that said, adding functions to Array.prototype directly is also
suboptimal, and map should be moved to a separate function.
Original comment by bcke...@google.com
on 10 Dec 2010 at 1:18
Original comment by bcke...@google.com
on 10 Dec 2010 at 1:19
Fixed in r65
Original comment by bcke...@google.com
on 30 Dec 2010 at 3:26
Original issue reported on code.google.com by
grzegorz...@gmail.com
on 29 Jan 2010 at 2:40