参考:https://blog.csdn.net/qq_2411868438/article/details/124447051
try { array.forEach((element) => { if ((element.id == 3)) { throw Error("msg"); } }); } catch (error) { console.log(error); }
标签:跳出,element,循环,forEach,error,js From: https://www.cnblogs.com/jqynr/p/16813526.html