Skip to content

Instantly share code, notes, and snippets.

@sscotth
Last active October 25, 2020 01:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sscotth/7dc69955c859985d065e021cb1a25be6 to your computer and use it in GitHub Desktop.
Save sscotth/7dc69955c859985d065e021cb1a25be6 to your computer and use it in GitHub Desktop.
Range
const range = n => [...Array(n).keys()]
const range = (x, y) => Array.from({ length: y - x }, (v, k) => k + x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment