Created
February 12, 2024 20:11
-
-
Save rozanovz/2df0e5bf8884a74533e9095ae5c2d7f7 to your computer and use it in GitHub Desktop.
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 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