3 ms·
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 == ''`, `
by kokanee 3y ago
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.