SOURCE

// 解构是数组es6的新语法

// 定义一个数组
function breafast(){
  return ['面包','茶','梨子'];
}
//老方法的话
var tem = breafast();
var deseart = tem[0];
var tea = tem[1];
var fruit = tem[2];


//es6的新语法
let [deseart,tea,fruit] = breafast();


console.log(deseart,tea,fruit)
console 命令行工具 X clear

                    
>
console