Skip to content

Instantly share code, notes, and snippets.

@jericbas
Created March 12, 2019 17:37
Show Gist options
  • Save jericbas/b72c14efc5e0511c3edc59c25633ac9c to your computer and use it in GitHub Desktop.
Save jericbas/b72c14efc5e0511c3edc59c25633ac9c to your computer and use it in GitHub Desktop.
Javacript: Create number range in array
const range = (start, end) =>
new Array(end - start + 1).fill(undefined).map((_, i) => i + start);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment