foreach如何跳出循环
break;continue不生效,
使用
try { l.forEach((v, i, a) => { if (a[i].is_myself == 1) { that.leftIndex = i throw new Error('err') } }) } catch (e) { return; }
你看三小欸还不学习
break;continue不生效,
使用
try { l.forEach((v, i, a) => { if (a[i].is_myself == 1) { that.leftIndex = i throw new Error('err') } }) } catch (e) { return; }