Last active
October 18, 2022 16:10
-
-
Save whoisryosuke/410f453f9d0356ab3f59d3e66990bd1d to your computer and use it in GitHub Desktop.
JS - Broken array mapping -- need to use `[...new Array(16)]`
This file contains hidden or 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
| new Array(16) | |
| .map((_, index) => { | |
| console.log('first', index) | |
| return index | |
| }) | |
| .reverse() | |
| .map((index) => console.log(index)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment