This is only part of the why. The other part is the valueOf function which you can specify in order to control what the value of an object is when coerced.<p>So for instance:<p><pre><code> var arr1 = [1,2,3], arr2 = [1,2,3,4];
console.log(arr1 + arr2); // "1,2,31,2,3,4"
arr1.valueOf = function () { return this.length; };
arr2.valueOf = arr1.valueOf;
console.log(arr1 + arr2); // 7</code></pre>