Created
January 22, 2020 05:48
-
-
Save SeaniaTwix/f2939e6c785c9ef012d0ff89287c63f8 to your computer and use it in GitHub Desktop.
ranged 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
function range(start, end) { | |
const n = end - start | |
return Array.from([...Array(n + 1).keys()], i => i + start) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment