Skip to content

Instantly share code, notes, and snippets.

@karolk
Created February 10, 2017 19:55
Show Gist options
  • Save karolk/69f0f1242ab70c6bac8120811c314442 to your computer and use it in GitHub Desktop.
Save karolk/69f0f1242ab70c6bac8120811c314442 to your computer and use it in GitHub Desktop.
Non iterative range (inclusive)
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