3 ms·
> isOdd(2)` is a lot easier to understand than `value % 2` Isn't modulo something basic every programmer should know about?
by goatlover 9y ago
> isOdd(2)` is a lot easier to understand than `value % 2`
Isn't modulo something basic every programmer should know about?
- cannedslime 9y agois-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...
- caspervonb 9y agoSplitting hairs, yes that uses bitwise operators, you can get away with either a modulus operator or a bitwise AND operator.