In Javascript, {} + [] = 0 is true. Why?

I really don"t understand the operation principle of JS. I would like to ask my brother to explain a wave

.
{}+[] ===0   true
[]+{} ===0   false

{} is a code block, so execute + [] . Because [] is an object, toPrimitive- > valueOf- > toString is ', resulting in +'= 0


https://www.zhihu.com/questio.

.
Menu