1. rest(可变)参数
* 用来取代arguments 但比arguments灵活,只能是最后部分形参参数
function add(...values) { let sum = 0; for(value of values) { sum += value; } return sum; }
2 点点点运算符
let fg=[3,4,5] let arr = [2,3,4,5,6]; let arr1 = ['abc',...arr,...fg]; console.log(arr1);//2,3,4,5,6,3,4,5,