4 ms·
You can drop the new [...Array(1000)] I think that is the least bits. Would love to be proven wrong :D
by ficklepickle 6y ago
You can drop the new
[...Array(1000)]
I think that is the least bits. Would love to be proven wrong :D
- franky47 6y agoIt may be shorter, but I like the spread syntax best used sparingly, it's harder to grasp why it was necessary there at a glance. That's what I like in the elegance of Array.from({ length: 1000 }): it's a hack, but it reads naturally.
- antonvs 6y ago"Harder to grasp" only lasts until you're mildly familiar with the idiom.
- trehalose 6y ago[...Array(1e3)]