Skip to content

Instantly share code, notes, and snippets.

@rozanovz
Created February 12, 2024 20:11
Show Gist options
  • Select an option

  • Save rozanovz/2df0e5bf8884a74533e9095ae5c2d7f7 to your computer and use it in GitHub Desktop.

Select an option

Save rozanovz/2df0e5bf8884a74533e9095ae5c2d7f7 to your computer and use it in GitHub Desktop.
const fromTo = (from, to) => {
let value = -1;
return () => {
if((value + 1) === to) return null;
value++;
return from + value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment