Y
Hacker News
new
|
ask
|
show
|
jobs
by
blinger
2697 days ago
Array.from({ length: 5 }).forEach(fn)
1 comments
Waterluvian
2697 days ago
Oh not bad. I wasn't aware of that!
I'm guessing it constructs the whole array upfront. Maybe there's a generator way to do it too.
link
I'm guessing it constructs the whole array upfront. Maybe there's a generator way to do it too.