Skip to main content
Bounty Ended with 100 reputation awarded by xnor
added 504 characters in body
Source Link
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.

Python 3.8 (pre-release), 67 bytes

print("def f(n):n in",[*range(2**32)],"==print('eovdedn'[n&1::2])")

Try it online!

pog

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.

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.

Python 3.8 (pre-release), 67 bytes

print("def f(n):n in",[*range(2**32)],"==print('eovdedn'[n&1::2])")

Try it online!

pog

added 52 characters in body
Source Link
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 6457 bytes

_=>a+_
for(a='x=>',i=0;i<2**32;)a+=`x==${i++}i=0;a+=i+'==x?x%2?"odd":"even":`',~i++;)_=>a+_

Try it online!Try it online!

tsh suggests bitwise operator.

JavaScript (Node.js), 64 bytes

_=>a+_
for(a='x=>',i=0;i<2**32;)a+=`x==${i++}?x%2?"odd":"even":`

Try it online!

.

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.

Source Link
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 64 bytes

_=>a+_
for(a='x=>',i=0;i<2**32;)a+=`x==${i++}?x%2?"odd":"even":`

Try it online!

.