-_-#傻傻分不清楚

var arr = []
var index = 0
var postfix = 0
for (; index < 10; index++) {
    postfix = 0
    console.log(postfix) // 0 0 0 0 0 0 0 0 0 0
    for (; postfix < 100; postfix++) {
        arr.push(index * 100 + postfix)
    }
}
console.log(arr, arr.length) // ... 1000

arr = []
index = 0
postfix = 0
for (; index < 10; index++) {
    console.log(postfix) // 0 100 100 100 100 100 100 100 100 100
    for (; postfix < 100; postfix++) {
        arr.push(index * 100 + postfix)
    }
}
console.log(arr, arr.length) // ... 100
原文地址:https://www.cnblogs.com/jzm17173/p/3630278.html