Are Javascript string arrays automatically separated by commas?
<p>After reading <a href="http://stackoverflow.com/questions/201724/easy-way-to-turn-javascript-array-into-comma-separated-list">this discussion</a> and <a href="http://www.hunlock.com/blogs/Mastering_Javascript_Arrays" rel="nofollow">this article</a>, I still have this question. Let's say I have the following snippet:</p>

<pre><code>var arr = new Array(3);
arr[0] = "Zero";
arr[1] = "One";
arr[2] = "Two";

document.write(arr.join(","));
</code></pre>

<p>If I replace the <code>document.write()</code> line with <code>document.write(arr);</code>, are they equivalent? Does the replacement statement automatically join array elements with a comma as the delimiter?</p>

<p>Thanks in advance!</p>
