-
-
Save Uvacoder/f0a7842246b6c935501b1f8dc81eb578 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