当解构赋值时没有值会设置一个默认值
let [a = 'false'] = []
console.log(a)
编译成es5的结果
var _ref = [],
_ref$ = _ref[0],
a = _ref$ === undefined ? 'false' : _ref$;
console.log(a);
结构赋值 undefined和null的结果
let [a, b = 'wanjunshijie', c = 'wj2'] = ['wj', undefined, null]
console.log(a)
console.log(b)
console.log(c)
执行结果