for..in 方法 对数组操作时
let list = [4, 5, 6];
for (let i in list) {
console.log(i); // "0", "1", "2",
}
for (let i of list) {
console.log(i); // "4", "5", "6"
}
for in 对数组对象操作时 打印属性
let list = [{name: '1',color:'y'}];
for (let i in list[0]) {
console.log(i); // "name", "color"
}