解构赋值 你眼中的光 2024-02-26 31 阅读1分钟 ES6 允许按照一定模式,从数组和对象中提取值,对变量进行赋值,这被称为解构赋值 数组 const F4=['111','222','333','444']; let [f1,f2,f3,f4]=F4; 对象 const people={ name:'八戒', age:111, from:function(){ console.log('无敌了'); } } let {name,age,from}=people;