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

1 == 1 == 1 is actually true in Javascript due to type coercion

You're probably thinking `1 === 1 === 1` which is indeed false



I tried 2 == 2 == 2 in my browser's (Chrome) console and it evaluated to false.


I stealth edited my post. Sorry.




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

Search: