How to append (connect) strings to construct a new string?
<p>I have a array of strings:</p>

<pre><code>str[1]='apple';
str[2]='orange';
str[3]='banana';
//...many of these items
</code></pre>

<p>Then, I would like to construct a string variable which looks like <strong>var mystr='apple,orange,banana,...'</strong>, I tried the following way:</p>

<pre><code>var mystr='';
for(var i=0; i&lt;str.length; i++){
  mystr=mystr+","+str[i];
}
</code></pre>

<p>Which is of course not what I want, is there any efficient way to connect all this str[i] with comma?</p>
