Created
September 22, 2018 20:22
-
-
Save ericchernuka/d74dfef819c6c43c7688ed8288329acf to your computer and use it in GitHub Desktop.
ES6 Range Generator
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
const range = n => Array.from({length: n}, (value, key) => key) | |
const range = (n, cb = (value, index) => index) => Array.from({length: n}, cb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment