Lately i have been experimenting with node.js and I found out that javascript has some syntactic logic that I could not wrap my head around. This is an example I do not understand and I was wondering whether this is just a random javascript fact or if there is any logic to it.

For Non primitive types like arrays, for applying addition, it has to be converted to primitive, ToPrimitive, would call toString() for non primitive types. So, in this case [] becomes "", and hence "", as the result.