https://en.wikipedia.org/wiki/Parity_of_zero#Education
Claims made by students:
"Zero is not even or odd."
"Zero could be even."
"Zero is not odd."
"Zero has to be an even."
"Zero is not an even number."
"Zero is always going to be an even number."
"Zero is not always going to be an even number."
"Zero is even."
"Zero is special."
https://en.wikipedia.org/wiki/Teach_the_ControversyWe need more old coders around!
Old coders never die, they just get frozen until their favorite programming languages come back into fashion.
What is-odd does is to throw an exception if you pass anything that isn't a safe integer or a string representation of a safe integer. Otherwise it just returns n % 2 === 1 (after converting string to int if necessary)
Isn't the parameter always floating point in Javascript? (which does mean a package like isOdd will have to incorporate some level of mysticism...)
I can understand how fundamental education teachers don't grasp modern Algebrism and believe that Math is formed by fundamental, sacred definitions. But programmers ought to know better.