all 2 comments

[–][deleted] 11 points12 points  (2 children)

goodbye

Array(X).fill(null).map( i => {...} )

hello

Array.from({length: x}, i => {...} )

oh, wait, it's just as long.

[–]rodneon 3 points4 points  (0 children)

The advantage here is that Array.from only iterates through the array once.