I’ll never new Array(length) again. Holy holey @mathias , although the fact typed Arrays want length upfront can be confusing! #NodeConfAr17
-
-
also, "I want a string of 25 A's": Array(26).join("A"). Uncommon to need it, but a useful trick :)
1 reply 0 retweets 1 like -
I prefer `Array.from({ length: 25 }, (_) => 'A')` although that too results in a HOLEY_* array.
2 replies 0 retweets 1 like -
But, to be clear, that one doesn't result in a holey array, right? https://gist.github.com/bendc/17ea948bea5848a0e112ece8840bcfdd …
1 reply 0 retweets 1 like
Correct.
4:10 AM - 30 Oct 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.