4 ms·
Yeah, that one is funny > [] == [] false > [] == ![] true
by mirekrusin 6y ago
Yeah, that one is funny
> [] == []
false
> [] == ![]
true
- mirekrusin 6y agoHowever typescript says: This condition will always return 'false' since the types 'never[]' and 'boolean' have no overlap. ...for `[] == ![]`. Which is ironic because it does return true, not false. However at least it flags an error! I wonder how much of weirdness is wiped out by linters/ts/etc.