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

> In js I thought 1==true, and 1 is shorter than !0 ??

`1==true` but `1!==true` (`===` and `!==` check for type equality as well and while `!0` is a boolean, `1` is not.



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

Search: