Can Y.Array be sparse?

Javascript supports both dense and sparse (aka ‘holey’) arrays.

Is it safe to use Y.Array in a sparse way? For example:

yarray.insert(0, [1])
yarray.insert(6, [1])
yarray.insert(36, [1])
yarray.insert(127, [1])

…and if this is possible, are there any performance implications or gotchas to look out for?

Thanks in advance, and thanks also for this frankly mind-blowing library :slight_smile:

1 Like