Hacker News new | past | comments | ask | show | jobs | submit login

If the two sides of the comparison have different types, JavaScript tries to coerce the values using rules that are pretty strange. The recommendation I've heard most often is to always prefer === and !==.



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

Search: