Skip to content

Instantly share code, notes, and snippets.

@nestoralonso
Created March 9, 2021 18:57
Show Gist options
  • Save nestoralonso/2e0bc1c41a5d487a6d3f28724bfb807b to your computer and use it in GitHub Desktop.
Save nestoralonso/2e0bc1c41a5d487a6d3f28724bfb807b to your computer and use it in GitHub Desktop.
Generates an array containing the interval [lower, max) a la python
// Generates an array containing the interval [lower, max) a la python
const range = (lower, max) => Array.from({ length: max - lower }, (x, i) => lower + i);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment