[] + {} = "[object Object]"
{} + [] = 0
[] + [] = ""
{} + {} = NaN
Who can explain me, why these operations give totally unexpected results? How does operator overloading is set for "+" in such kind of situations?
[] + {} = "[object Object]"
{} + [] = 0
[] + [] = ""
{} + {} = NaN
Who can explain me, why these operations give totally unexpected results? How does operator overloading is set for "+" in such kind of situations?