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

... well now I feel dumb, I guessed 5 ... except for false itself!


false, 0, null, undefined, "", NaN

Everything else is truthy. If you think about the original use of JS as mostly input validation, the values above make total sense.




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

Search: