696
coding chess
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Is this the same person who coded the odd/even function?
I have a better odd/even function:
This will work for both negative numbers and arbitrarily large integers. I've tested it up to 26 but I'm pretty sure it will work up to infinity.
Though serious question: Why are these forums coded in such a way that they ignore single newlines? How hard is it to replace a newline with a br tag?
Edit: added two spaces, should look much better.
Edit2: just looks a bit better lol
Edit3: better now?
Can you put this in a npm package so I can use it in my project, please?
Just copy paste it into each source file, I give you permission to reuse the code.