forEach如何中断

70 阅读1分钟
const arr = [2, 3, 4]
arr.forEach(item => {
    console.log(item);
    throw new Error()
})