对象的解构
对象的解构赋值,可以很方便地将现有对象的方法,赋值到某个变量。
// 例一
let { log, sin, cos } = Math;
// 例二
const { log } = console;
log('hello') // hello
let obj={
name:mg,
age:16,
id:12345678
}
let {name,age,id}=obj
console.log(name,age,qq) // mg,16,12345678
总结欠缺的知识点
持续更新中