Skip to content

Instantly share code, notes, and snippets.

@SeaniaTwix
Created January 22, 2020 05:48
Show Gist options
  • Save SeaniaTwix/f2939e6c785c9ef012d0ff89287c63f8 to your computer and use it in GitHub Desktop.
Save SeaniaTwix/f2939e6c785c9ef012d0ff89287c63f8 to your computer and use it in GitHub Desktop.
ranged array
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