Hacker News new | ask | show | jobs
by goatlover 2979 days ago
> isOdd(2)` is a lot easier to understand than `value % 2`

Isn't modulo something basic every programmer should know about?

1 comments

is-odd package doesn't use modulus. And I don't think thats really the issue either. is-odd has three dependencies of its own, one being is-number...
Splitting hairs, yes that uses bitwise operators, you can get away with either a modulus operator or a bitwise AND operator.