Last active
August 30, 2023 15:21
-
-
Save dperuo/252b89f09f5e50237a39ccf55ab4fc06 to your computer and use it in GitHub Desktop.
This file contains 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 range = ({ min = 0, max = 10, step = 1}): number[] => { | |
return min > max ? [] : [min, ...range({ min: min + 1, max, step})].filter(item => item % step === 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment