Skip to content

Instantly share code, notes, and snippets.

@hperantunes
Last active January 13, 2020 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hperantunes/507ce5321cd8dccfe7fdac0c3ce94827 to your computer and use it in GitHub Desktop.
Save hperantunes/507ce5321cd8dccfe7fdac0c3ce94827 to your computer and use it in GitHub Desktop.
export function* range(start, end = 0, step = 1) {
for (let value = start; value <= end; value += step) {
yield value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment