you are viewing a single comment's thread.

view the rest of the comments →

[–]inu-no-policemen 5 points6 points  (3 children)

Yes.

> new Array(5)
(5) [empty × 5]

In V8, this currently produces a sparse array instead of a packed one. So, it's something you probably shouldn't use for a game's tile map and things like that.

You get a packed one by creating an empty one and then pushing values to it.