i++在前面

var i = 1;

while (i <= 10) {
    i++;
    console.log(i);
}

2023-06-26T13:42:55.png

i++在后面

var i = 1;

while (i <= 10) {
    console.log(i);
    i++;
}

2023-06-26T13:43:23.png