In JavaScript it's not advisable to loop through an Array with a for-in loop, but it's better to use a for
loop such as:
for(var i=0, len=myArray.length; i < len; i++){}
It's optimized as well ("caching" the array length). If you'd like to learn more, read my post on the subjectread my post on the subject.