Last active
December 7, 2015 13:37
-
-
Save stasgavrylov/126330125b29c05d7844 to your computer and use it in GitHub Desktop.
Init array with values
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
function arrayOfInts(n) { | |
return Array.apply(null, {length: n}).map(function(v,i) {return i}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment