for of 遍历数组中的每个值,
let arr = ["F72", "123", 2000, false]; for(let items of arr){ console.log(items);//"F72", "123", 2000, false
}
for in 遍历数组中的每个下标
let arr = ["F72", "123", 2000, false]; for(let index in arr){ console.log(index);//0,1,2,3 }
原文:https://www.cnblogs.com/wuyang0101/p/14355135.html