6 ms·
Depends how much you care about the equality and how strict. by default == will do type coercion so you can get weird results where things like [] == 0 are true
by kylemuir 5y ago
Depends how much you care about the equality and how strict. by default == will do type coercion so you can get weird results where things like [] == 0 are true.
More equality fun in JS can be seen here: https://dorey.github.io/JavaScript-Equality-Table/ https://dorey.github.io/JavaScript-Equality-Table/