array = zero, typeof(0) == string array = now, typeof(1254503972355) == string array[3.14] = pi, typeof(3.14) == string
Notice how I used
for...in syntax, which only gives you the indices that are actually defined. If you use the more common
for (var i = 0; i < array.length; ++i) style of iteration then you will obviously have problems with non-standard array indices.