4 ms·
this just reminded me that true != [] //true despite Boolean([]) === true //true and if ([]) console.log("1") // logs 1 and at the same time referen
by moritzwarhier 3y ago
this just reminded me that
true != [] //true
despite
Boolean([]) === true //true
and
if ([]) console.log("1") // logs 1
and at the same time reference equality when not coercing!?
[] == [] //false
thank god implicit coercion with the weak equality operator is forbidden in all commin linter configurations