const arr = [1, 2, 3, 4, 5, 6, 7]; // not modified [...arr].forEach((num, i, currentArr) => { if (num === 4) { return currentArr.splice(i); // break } console.log(num); });