数组
let a = 1;
let b = 2;
let c = 3;
let [a, b, c] = [1, 2, 3];
set结构:
let [x, y, z] = new Set(['a', 'b', 'c']);
x // "a"
允许默认值
let [x = 1] = [undefined];
x // 1
let [x = 1
数组
let a = 1;
let b = 2;
let c = 3;
let [a, b, c] = [1, 2, 3];
set结构:
let [x, y, z] = new Set(['a', 'b', 'c']);
x // "a"
允许默认值
let [x = 1] = [undefined];
x // 1
let [x = 1