{} + [] - Erroneous?

ichigake

New Member
I get these outputs when the following operations are carried out\[code\]var t = {} + {}; // Alerts [object Object][object Object]t = {} + 1 //Alerts [object Object]1t = {} + "hello" //Alerts [object Object]hellot = {} + function(){} //Alerts [object Object]function(){}t = {} + [] //Alerts [object Object]\[/code\]In the last case alone it alerts \[code\][Object object]\[/code\] shouldn't it display \[code\][object Object][object Object]\[/code\] for this too? Tested in Firefox12.0.
 
Top