Created
January 8, 2017 00:15
-
-
Save Cauterite/87e56c77f4803704704ebb9ad95c3e49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array(5) | |
-> [<5 empty slots>] | |
[...Array(5)] | |
-> [undefined, undefined, undefined, undefined, undefined] | |
[...Array(5)].map((_, X) => X) | |
-> [0, 1, 2, 3, 4] | |
[...Array(5).keys()] | |
-> [0, 1, 2, 3, 4] | |
Object.keys([...Array(5)]) | |
-> ["0", "1", "2", "3", "4"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment