Skip to main content
2 of 3
added 52 characters in body
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 57 bytes

for(a='x=>',i=0;a+=i+'==x?x%2?"odd":"even":',~i++;)_=>a+_

Try it online!

tsh suggests bitwise operator.

l4m2
  • 28.3k
  • 2
  • 25
  • 103