foreach遍历数组时,没有返回值,不能使用return跳出循环,如果想要跳出循环,可以使用try{}catch(e){ throw e }
foreach遍历
使用vue时,forEach循环不能使用break跳出循环,return只跳出当前循环

相关文章: