title: JavaScript array element to string
body: <p>i have a simple array and i want to generate string which include all the elements of the array, for example:</p>
  
  <p>The array is set as follow:</p>
  
  <pre><code>array[0] = uri0
  array[1] = uri1
  array[2] = uri2
  </code></pre>
  
  <p>And the output string must be </p>
  
  <pre><code>teststring = uri0,uri1,uri2
  </code></pre>
  
  <p>I've tried to make this following way (using for loop):</p>
  
  <pre><code>var teststring = "";
  teststring = teststring+array[y]
  </code></pre>
  
  <p>but in the firebug console i see an error message:</p>
  
  <pre><code>"teststring is not defined"
  </code></pre>
  
  <p>I don't know, what I'm doing wrong. Can someone give me a hint?</p>