我用forEach是不是list长度0的时候它不执行,那我for为什么还是不行list=[{id:1,name:'a'},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
list=[{id:1,name:'a'},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
{id:1,name:'a'},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
id:1,name:'a'},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
name:'a'},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
},{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
{id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
id:2,name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
name:'b'}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
}]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
]push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
push(action){list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
list.forEach(i=>{if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
if(i.code!==action.code){list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
list.push(action);}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
}})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
})}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
}push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
push(action){for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
for(vari=0;iif(list[i].code!==action.code){list.push(action);}}}
list.push(action);}}}
}}}
}}
}
弑天下
相关分类