Javascript tries to apply the + operator in different ways, it's been taught to.
So unless explicitly told, it calls the toString method of the Array which is it's best guess when it's told to add two arrays.
[] + [] = ""
+[] + [] = "0" // If you give a hint to cast one of the array to a Number
+[] + +[] = 0 // If you give a hint to cast both the arrays to Number
While [] + [] + "foo" is simply
([] + []) + "foo" = "" + "foo" = "foo"