Create comma-delimited string
<p>I'm looking to find a neat way to create a comma-delimited string from an array. This is how I'm doing it now...</p>

<pre><code>for(i=0;i&lt;10;i++)
{
   str = str + ',' + arr[i];
}
str=str.substring(1)
return str;
</code></pre>

<p>... but it feels a bit untidy.</p>
