Created
July 13, 2017 18:03
-
-
Save ethanstenis/865df4ba179fd114fb25f6a0ed93bbbf to your computer and use it in GitHub Desktop.
This is the solution for the Odds/Even/Prime Number Kata
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
function oddEven() { | |
for(let i = 1; i <= 100; i++) { | |
if(i % 2 === 0) { | |
console.log('Even'); | |
} else if (i % 2 !== 0 && i % 3 === 0 || i % 9 === 0 || i % 5 === 0){ | |
console.log('Odd'); | |
} else { | |
console.log(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment