Possible Duplicate:
JavaScript for…in vs for
difference between for..in and for loops, and counter declaration
Is there any particular reason that for loops in arrays should be coded like for (var i = 0; i < foo.length; i++) {
whereas loops in objects are just for (var i in foo) {
Is it because of how objects are set up vs how arrays are set up? (I know arrays are a type of object btw) or just another nitpicky programming convention.