I know that using for...in
is meant to be for objects, and I also know that for i=0;i<arr.length;i++
loops work fine, but sometimes I want to use for..in
s for looping through arrays (I code in both python and js, but my poor brain doesn't want to constantly change my coding style.)
My question is: Is it guarunteed that using for...in
will give me array objects in order?
PS. My question is specifically for ARRAYS, instead of objects with potential ambiguity in order, so I thought it might be different.