Dear All,

I am try to slice() method. but not stop execution. Below mentioned the 
code. kindly updates.

const x = array
      .slice(0) // create copy of "array" for iterating
      .reduce((acc, curr, i, arr) => {
        if (i === 1) arr.slice(1); // eject early by mutating iterated copy
         console.log('i=> ', i);
      }, '');
   

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/28e8c0f4-fe10-448b-b575-4ffd9f9f4accn%40googlegroups.com.

Reply via email to