Last active
December 19, 2022 23:05
-
-
Save sketchpunk/33307c54a96166add626f81560ccf4d4 to your computer and use it in GitHub Desktop.
create array without an array
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
const num=2; | |
console.log( Array.from( {length:5}, (_,i,v=i+num )=>{ | |
console.log( i, v ); | |
return v; | |
} )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment