if u do
a = []
a[3] = 100
the indices 0,1,2 will be filled in with undefined
for u. u do not have to set a specific array length before using certain indices. array will grow as u use it.
all these are the same:
a = [,,,]
b = []
b.length = 3
c = new Array(3)
d = []
d[2] = undefined