数组循环

46 阅读1分钟
arr旧数组  other新数组  判断新数组里有旧数组没有的id
  let flag = true;
  for (let i=0;i<arr.length;i++){
    if(!otherFlie.value.some(item=>item.editionId == arr[i].editionId)){
      // true 都包含不能提交   flag 有一个没包含可以提交
      flag = false;
      break;
    }
  return !flag;