JavaScript uses type Type Conversion to coerce any value to a Boolean in contexts that require it, such as conditionals and loops.
In first case
console.log( 0 == '0');
javascript uses coerceing and converts both to number and compares . Now 0==0 so true is returned .
In second case
console.log( 0 == [] );
Both are falsy (A falsy value is a value that translates to false when evaluated in a Boolean context ) . So now comparing false == false , true value is returned .
In 3rd case
console.log( [] == '0');
[] is falsy and '0' is string , js is not able to coerce them to convert the to type which can be compared . so false is returned .