title: jquery each function and array show undefined in a for loop
body: <p>This is the html part for my problem</p>
  
  <pre><code>&lt;DIV ID="CONTAINER"&gt;
      &lt;DIV CLASS="ITEMS"&gt;
          Purchase
      &lt;/DIV&gt;
      &lt;DIV CLASS="ITEMS"&gt;
          Return
      &lt;/DIV&gt;
      &lt;DIV CLASS="ITEMS"&gt;
          On Hold
      &lt;/DIV&gt;
      &lt;DIV CLASS="ITEMS"&gt;
          Exchange
      &lt;/DIV&gt;
  &lt;/DIV&gt;    
  </code></pre>
  
  <p>Jquery</p>
  
  <pre><code>var MyArray = [];  
  var $Items = $('.ITEMS');
  $Items.each( 
    function(){
      Value = $.trim($(this).html());
      MyArray.push(Value);
    }
  );
  var Count_Parts = MyArray.length;            
  for (i = 1; i &lt;= Count_Parts; i++ ){
    console.log(MyArray[i]);
  }
  </code></pre>
  
  <p>My Problem is that the console does not show correct results i see Return, On Hold, Exchange, undefined.....
  It is skipping Purchase and showing undefined instead?
  Why is Purchase being undefined?</p>