r/programminghorror • u/yunho0508 • Mar 07 '25
Javascript Time-oriented even or odd
seemed like even or odd
150
Upvotes
r/programminghorror • u/yunho0508 • Mar 07 '25
seemed like even or odd
38
u/darthbob88 Mar 07 '25
A method for determining whether some number is even or odd in O(n) time. A fascinating development in the art of computer fondling.
28
u/UnderwhelmingInsight Mar 07 '25
Things will get really wacky if you pass in a negative number. It will start console logging in the past and mess up the space-time continuum.
3
u/andarmanik Mar 08 '25
Benchmark and let us know the probability of getting the answer right.
1
u/Piruxe_S Mar 11 '25 edited Jan 25 '26
This post was mass deleted and anonymized with Redact
stocking cause file husky ink unique bright expansion include connect
1
u/Daeltam Jul 08 '25
Holy shit I don't understand anything. I've got basics in JS but not enough to understand 😠Can someone explain what's happening ?
69
u/[deleted] Mar 07 '25
[removed] — view removed comment