title: Angular : How to copy one array to another?
body: <p>I'm setting one array equalls to another</p>
  
  <pre><code>        orders = [
             {
              'id': PROCESSING,
              'displayName': 'Processing'
             },
             {
              'id': SHIPPED,
              'displayName': 'Shipped'
             }
          ];
  
          cloneOrders = [];
  
  setOrders() {
          this.orders.forEach((order: any) =&gt; {
                  this.cloneOrders = order;
          });
      }
  </code></pre>
  
  <p>But when I try to get values of 'cloneOrders' in another funtion it return an empty array</p>
  
  <pre><code>getOrders(status, minutes) {
          this.cloneOrders .forEach((order: any) =&gt; {
                  console.log(order);
          });
      }
  </code></pre>
  
  <p>Both functions are in a same component. Please help me how to resolve this thanks.</p>