Created
February 10, 2017 19:55
-
-
Save karolk/69f0f1242ab70c6bac8120811c314442 to your computer and use it in GitHub Desktop.
Non iterative range (inclusive)
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 = (from, to) => | |
[from] | |
.concat(Array(to-from).fill(from)) | |
.map((n,index) => n+index) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment