3 ms·
That's hilarious. What's not hilarious is that, after removing the essentially useless error-checking, is-even is literally just `(n % 2) === 1`. On one hand,
by soulofmischief 7y ago
That's hilarious.
What's not hilarious is that, after removing the essentially useless error-checking, is-even is literally just `(n % 2) === 1`. On one hand, JS desperately needs a standard library, on the other hand, JS devs can be so infuriatingly lazy and obtuse.
- choward 7y ago> is-even is literally just `(n % 2) === 1` Pretty sure that tells you if a number is odd. I guess maybe there is a reason these libraries exist.
- soulofmischief 7y agoThat was just a typo, I meant the source for is-odd. I copy-pasted it. I use that exact syntax all the time in code, you don't need to be patronizing.