ES6 函数参数的解构赋值

function add([x, y]){
  return x + y;
}

add([1, 2]); // 3

原文地址:https://www.cnblogs.com/nongzihong/p/10678522.html