在forEach中用return不会返回,函数会继续执行。
let nums = [1, 2, 3]; nums.forEach((item, index) => { return;//无效 })
中断方法: