Guest User

Untitled

a guest
Apr 26th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. this.globalError.testArray
  2.  
  3. this.globalError.testArray.splice(indexSelected, 1);
  4.  
  5. this.globalError.testArray.forEach(item => {
  6. if (item.index > indexSelected) {
  7. item.index -= 1;
  8. }
  9. });
  10.  
  11. this.globalError.testArray.forEach((item, i, myArray) => {
  12. if (item.index > indexSelected) {
  13. myArray[i].index -= 1;
  14. }
  15. });
  16.  
  17. this.globalError.testArray.map(item => {
  18. if (item.index > indexSelected) {
  19. item.index -= 1;
  20. }
  21. return item;
  22. });
Add Comment
Please, Sign In to add comment