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

    n % 1 == 0


Tried that first, but that will fail on the "false" case.


It needs a triple-equals, because false == 0, but false !== 0




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

Search: