console.log('2' > 1); // true, string '2' becomes a number 2
console.log('01' == 1); // true, string '01' becomes a number 1

let a = 0;
console.log(Boolean(a)); // false
let b = "0";
console.log(Boolean(b)); // true
console.log(a == b); // true

Strict Equality

console.log(0 == false); // true
console.log('' == false); // true
console.log( 0 === false ); // false, because the types are different

Comparison with null and undefined

console.log(null == undefined); // true
console.log(NaN == NaN); // false
console.log(undefined == undefined); // true
console.log(null == null); // true
console.log(undefined == null); // true