for (let i = 0; i < this.temp1.length; i++) {
let found = false; for (let j = 0; j < combination_name_list.length; j++) { if (combination_name_list[j] == this.temp1[i].name) {
found = true;
} if (j == combination_name_list.length - 1 && found == false) { this.combination.push({ "name": this.temp1[i].name, "rows1": this.temp1[i].rows, "rows2": [], "type": this.temp1[i].type
});
}
}
}想知道這兩層循環(huán)中i,和j的變化,里外層循環(huán)是怎么走的,以及這段代碼的意思,只能看懂一半!
想知道這兩層循環(huán)中i,和j的變化,里外層循環(huán)是怎么走的?
手掌心
2018-09-10 12:06:41