Based on abstract equality comparison algorithm your first code will be evaluated like below,
step 1 : ToNumber([]) == true
step 2 : ToPrimitive([]) == true
(ToNumber() will call ToPrimitve() when the passed argument is an object)
step 3 : "" == true
step 4 : 0 == true
step 5 : false == true
step 6 : false
And in your second case, [] is a truthy value, so if([]) will be evaluated to true always, here [] will not be converted as a primitive. Abstract equality comparison algorithm comes into play when you use == operator.
Another better example would be,
var x = [] || "hello";
console.log(x); // []
Since [] is a truthy value, x would be set with [] not "hello"