1const arr = [1, 2, 3];2arr.forEach((item, index) => {3 if (item === 2) {4 break;5 }6 console.log(item);7});