false == "0" // true
// false gets coerced to 0
// "0" gets coerced to 0
// 0 == 0 is true
false == 0 // true
// false gets coerced to 0
// 0 == 0 is true
false == "" // true
// false gets coerced to 0
// "" gets coerced to a number, 0
// 0 == 0 is true
false == [] // true
// false gets coerced to 0
// [] is an object so ToPrimitive would be called on it
// valueOf() would be consulted to find a primitive
// [].valueOf() would result in [], not a primitive value
// so [].toString() would be called, resulting in ""
// "" would then get coerced to a number, 0
// 0 == 0 is true
"" == 0 // true
// "" gets coerced to a number, 0
// 0 == 0 is true
"" == [] // true
// [] is an object so ToPrimitive would be called on it
// valueOf() would be consulted to find a primitive
// [].valueOf() would result in [], not a primitive value
// so [].toString() would be called, resulting in ""
// "" == "" is true
0 == [] // true
// [] is an object so ToPrimitive would be called on it
// valueOf() would be consulted to find a primitive
// [].valueOf() would result in [], not a primitive value
// so [].toString() would be called, resulting in ""
// "" would then get coerced to a number, 0
// 0 == 0 is true
Sources