Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer filling over spreading a new array with a size #16

Open
freaktechnik opened this issue Jun 17, 2018 · 1 comment
Open

Prefer filling over spreading a new array with a size #16

freaktechnik opened this issue Jun 17, 2018 · 1 comment

Comments

@freaktechnik
Copy link
Owner

Yeah, let's avoid doing the proposed solution in https://itnext.io/heres-why-mapping-a-constructed-array-doesn-t-work-in-javascript-f1195138615a and use filling instead.

@freaktechnik
Copy link
Owner Author

Alternatives would also be Array.from({ length: size }, (u, i) => map(i)); or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant