Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the solution for the Odds/Even/Prime Number Kata
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
You can’t perform that action at this time.