title: Understanding array iteration using the for loop statement
body: <p>So i have this simple script that populates a variable with an array. I then use a function with a for loop to iterate trough the array to get it's index values.</p>
  
  <pre><code>function printAllArrayValues(array) {
      for (var i = 0; i &lt; array.length; i++) {
          var c;
          c += array[i];
      }
      return c;
  }
  var colorArray = ["brown", "blue", "green"];
  alert(printAllArrayValues(colorArray));
  </code></pre>
  
  <p>The function returns a string containing all the array values but the first value = undefined. See fiddle: <a href="http://jsfiddle.net/vcyum/" rel="nofollow">http://jsfiddle.net/vcyum/</a></p>
  
  <p>Why is that? </p>