Adding Two Arrays
luljs 2011 still works[1, 2, 3] + [4, 5, 6] returns the string "1,2,34,5,6" instead of adding anything.
In 2026: Every engine still returns "1,2,34,5,6". The plus operator has no array mode, so each operand runs toString first and each array becomes a comma-joined string. Joining "1,2,3" to "4,5,6" sets the 3 that ends the first list against the 4 that starts the second, so the two lists read as 34 with no comma between them.
Where it came from: JavaScript Garden by Ivo Wetzel and Zhang Yi Jiang, the types section, around 2011. MDN ↗
<script>
document.write("<p><code>[1, 2, 3] + [4, 5, 6]</code> is <b>" + ([1,2,3] + [4,5,6]) + "</b></p>");
document.write("<p>Plus has no array mode, so each side runs toString and the two comma strings join.</p>");
</script>