logo
  • 教程列表
  • SO官方文档
  • 带有 Node.js 的 ECMAScript 2015(ES6)
    • constlet 声明
    • 箭头函数
    • 箭头函数示例
    • 解构
    • 流
    • ES6 课程
  1. StackOverflow 文档
  2. Node.js 教程
  3. 带有 Node.js 的 ECMAScript 2015(ES6)
  4. 解构

解构

Created: November-22, 2018

    let [x,y, ...nums] = [0, 1, 2, 3, 4, 5, 6];
console.log(x, y, nums);

let {a, b, ...props} = {a:1, b:2, c:3, d:{e:4}}
console.log(a, b, props);

let dog = {name: 'fido', age: 3};
let {name:n, age} = dog;
console.log(n, age);
  • 流
  • 箭头函数示例

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明