📅  最后修改于: 2022-03-11 15:03:15.487000             🧑  作者: Mango
const arr = [3, 5, 7];
arr.foo = "hello";
for (const i in arr) {
console.log(i); // 0, 1, 2, foo
}
for (const i of arr) {
console.log(i); // 3, 5, 7
}