Last active
August 29, 2015 14:12
-
-
Save dun4n/6db23f81442ed015352c to your computer and use it in GitHub Desktop.
Create an Array with values from 1 to N
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 f(N) { | |
return Array.apply(null, {length: N}).map(Number.call, Number); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment