Echo JS 0.11.0

<~>

stewartrule 1964 days ago. link 1 point
Why not use Array.from and/or Array.prototype.fill? :)

Array.from({ length: 3 }, (_, i) => i) // [0, 1, 2]
Array.from({ length: 3 }).fill(42) // [42, 42, 42]
Array(3).fill(42) // [42, 42, 42]
stewartrule 1964 days ago. link 2 points
ah missed that, but personally I would rather use the "verbose" solution than installing another dependency.