Hacker News new | ask | show | jobs
by charlieyu1 902 days ago
It is not just modulo, it also test for whether the input is a number or integer. It also has one dependency, is-number. And isOdd(“3”) returns true.

Basically it helps dealing with all the typing problems of Javascript, and also fitting into functional programming paradigms.

1 comments

If you need to know if a number is even or odd then you should convert it to an int natively anyway.