Created
March 9, 2021 18:57
-
-
Save nestoralonso/2e0bc1c41a5d487a6d3f28724bfb807b to your computer and use it in GitHub Desktop.
Generates an array containing the interval [lower, max) a la python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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