我根据对象中的code与数组中的做对比,然后成立的再执行一遍,可是只有两个能成立啊也就执行两回,怎么就无限循环了functiona(){for(leti=0;ilet{code}=objletnewCode=code.substring(0,code.length-1)if(newCode===arr[i].code){arr1.push(arr[i])console.log(arr1)a()}}}a()
functiona(){for(leti=0;ilet{code}=objletnewCode=code.substring(0,code.length-1)if(newCode===arr[i].code){arr1.push(arr[i])console.log(arr1)a()}}}a()
for(leti=0;ilet{code}=objletnewCode=code.substring(0,code.length-1)if(newCode===arr[i].code){arr1.push(arr[i])console.log(arr1)a()}}}a()
letnewCode=code.substring(0,code.length-1)if(newCode===arr[i].code){arr1.push(arr[i])console.log(arr1)a()}}}a()
if(newCode===arr[i].code){arr1.push(arr[i])console.log(arr1)a()}}}a()
arr1.push(arr[i])console.log(arr1)a()}}}a()
console.log(arr1)a()}}}a()
a()}}}a()
}}}a()
}}a()
}a()
a()
一只甜甜圈
慕后森
相关分类