var arra...
发布于 2022-03-03 16:38:53
var array = ["first","second","third","fourth"]
// 执行到第3次,结束循环
array.forEach(function(item,index){
if (item == "third") {
//等于third时跳出这个循环,如何实现
}
alert(item)// first,sencond
})
}
关注者
0
被浏览
12