对象与数组的解构、rest 操作符 2020-11-22 Top Up JavaScript 基本用法 123var [a, b] = [1, 2];console.log(a); // 1console.log(b); // 2 忽略部分值 123var [a, , b] = [1, 2, 3];console.log(a); // 1console.log(b); // 3 剩余模式 123var [a, ...b] = [1, 2, 3];console.log(a); // 1console.log(b); // [2, 3] 复合用法 1234567891011121314151617181920212223const x = { name: 'yiluyanxia', skill: [ { blueMagic: 'frozen' }, { blueMagic: 'blaze' } ]};let { name: chineseName, // rename skill: [ { blueMagic: skillName, // rename } ]} = x;console.log(chineseName); // "yiluyanxia"console.log(skillName); // "frozen" 函数进阶(箭头函数、默认参数) 块级作用域、模板字符串