es6 连接数组

Others 2017-07-20 08:12:08 2017-07-20 08:12:08 2373 次浏览
  const a=1;
    const b=[2,3];
    c=[a,...b];
    [e,...f]=[1,2,3,4];
    console.log(c);
    console.log(e);
    console.log(f);