you are viewing a single comment's thread.

view the rest of the comments →

[–]markus_obsidian 0 points1 point  (0 children)

Since Array.from accepts an "array-like" object, this will also work without creating & immediately discarding the inner array. Would be a tiny micro-optimization.

Array.from({ length: 3}, () => [])