If you open a JS Console in your browser (in my case Chrome) and type:
{} + []
you will get 0, but when you type
console.lo
Empty object as {} returns "[object Object]" when you call its toString() method. Empty array returns "" when you call its toString() method. Thus, console.log({} + []) will output "[object Object]"
{}
"[object Object]"
toString()
""
console.log({} + [])