ES6

 ... 三个点为 扩展运算符,能将 数组 转化为逗号分隔的 参数序列

1. 数组的合并
const a = ['1', '2'];
const b = ['4','5','6'];
const c1 = a.concat(b); //ES5需要用数组的concat方法拼接数组
const c2 = [...a,...b];

2. 数组的克隆
const a = ['1', '2'];
const b = [...a]; // ['1', '2']

3. 将为数组转化为真数组
 const divs = document.querySelectorAll('div'); // 在console.log中,其原型链显示他是对象object

 const divArr = [...divs];// 此时就变成了真正的数组
 
原文地址:https://www.cnblogs.com/ningxin/p/14464723.html