对象和数组的遍历方法

对象遍历方法for....in:

for(var 变量 in 对象){

数组遍历方法用下标[index]

console.log(key);
console.log(person[key]);

猜你喜欢

转载自www.cnblogs.com/ccc0114/p/9782115.html