es6 解构赋值

const nums=[1,3,5,11]

let [a,b]=nums

const user={name:"howhy",age:22}

let {name,age}=user

let arr1=[1,3,5]

let arr2=[...arr1,2,4,6]

 

posted @ 2021-03-01 16:39  howhy  阅读(46)  评论(0编辑  收藏  举报