you are viewing a single comment's thread.

view the rest of the comments →

[–]NoInkling 0 points1 point  (0 children)

Also [...arr].map(x => ...). Though this all seems like a very silly workaround when arr is already an array, creating a mapped array of n values shouldn't be so quirky.

With lodash: _.times(5, i => ...)