Created
August 10, 2015 13:02
-
-
Save raganwald/3c638920eacd5b58eda0 to your computer and use it in GitHub Desktop.
evenStevens is read-only
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 evenStevens = (n) => { | |
if (n === 0) { | |
return true; | |
} | |
else if (n == 1) { | |
return false; | |
} | |
else { | |
n = n - 2; | |
return evenStevens(n); | |
} | |
} | |
evenStevens = (n) => { | |
if (n === 0) { | |
return true; | |
} | |
else if (n == 1) { | |
return false; | |
} | |
else { | |
return evenStevens(n - 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment