|
|
|
|
|
by goto11
2208 days ago
|
|
It is trivially easy to avoid though, just use === instead of ==. Most of the JavaScript wtf's are people getting confused by the implicit type conversions (like [] == ![]). If you ask for it, JavaScript will readily convert a string to a number or an object to a boolean. But if you don't like that, just don't rely on implicit conversions. |
|