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

If you do this, you need to think through all the possible types for the comparators and how type coercion will affect the expression. For example, `0 == ''`, `[] == ''`, and `[] != []` are all `true`. If you're using typescript to get guarantees about the input types, maybe that's a good use case for using type coercion intentionally.



Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: