📜  js 解构 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:56.262000             🧑  作者: Mango

代码示例6
var foo = ['one', 'two', 'three'];

// without destructuring
var one   = foo[0];
var two   = foo[1];
var three = foo[2];

// with destructuring
var [one, two, three] = foo;