I'm a bit confused by the following results, could someone kindly point out what happened under the hood?
why Boolean([]) will return true?
and loosely compare empty array to a Boolean
[] == false would evaluate to true?
but strict comparison would evaluate to false??
This is the part I don't get it
Thanks so much!
Boolean([])
//true
[] == false
//true
[] === false
//false
Boolean([]) // => true
.
[] == false // => false
Check MDN document for more details
[] === false // => false