一、 扩展运算符 ( ... )
1. 合并数组、插入数组 var params1 = [1, 2,4]; var params2 = ['a', 'b', 5].concat(params1); => var params2 = ['a', 'b', 5, ...params1]; 2. Math var arr = [2, 4, 8, 6, 0]; console.log(Math.max(...arr)); 3. 数组赋值 var arr = ['a', 'b', 'c']; var arr2 = [...arr]; //arr和arr2互不影响 4. 字符串转为字符数组 var str = "hello"; var chars = [...str]; 参考:https://majing.io/posts/10000006411218