Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> (-11) % 3; // => -2, as one would expect

Nope, it's very unexpected. Because parity check can now return 3 outcomes.

(-3) % 2; // => -1



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: