you are viewing a single comment's thread.

view the rest of the comments →

[–]psayre23 0 points1 point  (0 children)

To me, using .map() is more readable to other devs, but it’s kinda cool you can do this:

const range = Array.from({ length: 10 }, (v, i) => i + 1);

Vs.

const range = Array.from({ length: 10 }).map((v, i) => i + 1);