// entries
let school = {
name:'北大',
citys:['北京','上海'],
subject:['web','js','大数据']
}
// console.log(Object.keys(school));//[ "name", "citys", "subject" ]
// console.log(Object.values(school));//[ "北大", (2) […], (3) […] ]
// console.log(Object.entries(school));//返回键值对数组
// let m = new Map(Object.entries(school));
// console.log(m);
网友评论