Skip to content

Instantly share code, notes, and snippets.

@tilap
Last active September 22, 2017 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tilap/4764c10cca39089b0b00debbc57005f4 to your computer and use it in GitHub Desktop.
Save tilap/4764c10cca39089b0b00debbc57005f4 to your computer and use it in GitHub Desktop.
Filling an array
// To get [1, 2, 3, 4, 5, 6, ..., 900]
const start = 1;
const end = 900;
const ids = Array.apply(null, { length: end - start}).map(Number.call, (num) => Number(num) + start);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment