is-odd
is-odd copied to clipboard
It's this simple:
function isOdd(n) { n % 2 != 0 ? console.log("Number is odd.") : console.log("Number is even."); }
isOdd(1) // "Number is odd." isOdd(2) // "Number is even."
I don't know if this is all a sick joke at that point.