title: Adding items to a new array using an array method
body: <p>Having difficulties with data testing and cannot get my function to return the new array in full (it stops at the first item).</p>
  <p>Here's the object that my function is testing:</p>
  <pre><code>it(&quot;should list out all of the order items by name&quot;, function() {
        var order1 = {
          orderNumber: 1,
          item: &quot;burger&quot;,
          price: &quot;8.99&quot;,
          orderType: &quot;delivery&quot;,
          status: &quot;accepted&quot;
        };
  
        var order2 = {
          orderNumber: 2,
          item: &quot;blt sandwich&quot;,
          price: &quot;5.99&quot;,
          orderType: &quot;delivery&quot;,
          status: &quot;accepted&quot;
        };
  
        var order3 = {
          orderNumber: 3,
          item: &quot;rueben&quot;,
          price: &quot;8.99&quot;,
          orderType: &quot;delivery&quot;,
          status: &quot;accepted&quot;
        };
  
        var deliveryOrders = [order1, order2, order3];
        var items = listItems(deliveryOrders);
  
        assert.deepEqual(items, &quot;burger, blt sandwich, rueben&quot;);
      }); 
  </code></pre>
  <p>This is my function. I think I need a different array method to return the new array (using 'concat' at the moment).</p>
  <p>This is the error message that my terminal is returning:</p>
  <ol>
  <li>order.js <br>
  listOrders <br>
  should list out all of the order items by name: <br>
  AssertionError: expected 1 to deeply equal 'burger, blt     sandwich, rueben'</li>
  </ol>
  <pre><code>function listItems(deliveryOrders) {
    var itemList = [];
    for (var i = 0; i &lt; deliveryOrders.length; i++) {
      return itemList.push(deliveryOrders[i].item);
    }
   itemList.concat(deliveryOrders[i].item);
  }
  
  </code></pre>