Here's Why Mapping a Constructed Array in JavaScript Doesn't Work
{ author: @ReisnerShawn }https://dev.to/sreisner/heres-why-mapping-a-constructed-array-in-javascript-doesnt-work-55di …
-
-
I love this, but why DOES Array.from() actually take a map function parameter though? That sounds like a lot of added design discussion on TC39 for something that could've just be done with Array.from().map()...
-
Consider what happens when the target array is a TypedArray with limited precision elements, for example a Uint16Array.
- 2 more replies
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Thanks for the hot tip! I found out about this because if my blog post. I like it more than the map spread solution and will be using it in the future.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
[...Array(100).keys()]
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.