Skip to content

Instantly share code, notes, and snippets.

@pietrom
Last active December 5, 2016 12:24
Show Gist options
  • Save pietrom/1d061b93fc3cbbca15962233f79648b7 to your computer and use it in GitHub Desktop.
Save pietrom/1d061b93fc3cbbca15962233f79648b7 to your computer and use it in GitHub Desktop.
function range(first, last) {
const length = last - first + 1
return new Array(length).fill(-1, 0, length).map(function(v, i) { return i + first; })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment