Created
February 17, 2022 20:31
-
-
Save gpDA/8327c87bcb79676ec408fb50ff89081f 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
// recursive | |
const recursiveOddOrEven = (number) => { | |
if (number === 0) { | |
return true; | |
} else if (number === 1) { | |
return false; | |
} else { | |
return recursiveOddOrEven(number - 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment