for-in:key,适用于objectfor-of:value,用于Array,string,set,map
let obj = { name: 'wuxiaodi', age: 18, }; for (let i in obj) { console.log(i)//name age } for (let i of arr) { console.log(i)//wuxiaodi 18 }