News for hackers. Stuff that matters.
Re:4B If Statements by charlieyu1 on Thursday December 28, 2023 @03:03PM (#38797937)
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.

Re:4B If Statements by ownlife on Thursday December 28, 2023 @03:21PM (#38798119)
If you need to know if a number is even or odd then you should convert it to an int natively anyway.