+ 3
Did you know this?
var foo = [0]; console.log(foo == !foo); // true console.log(foo == foo); // also true!!!
1 Resposta
+ 2
!foo = false
0 => false as binary
That's why foo ==!foo is true.
If you do this with foo= [1 or 2 or....] it will return false.