Why is [1,2] + [3,4] = “1,23,4” in JavaScript?
The + operator is not defined for arrays. What happens is that Javascript converts arrays into strings and concatenates those. Update Since this question and consequently my answer is getting a lot of attention I felt it would be useful and relevant to have an overview about how the + operator behaves in general … Read more