一、三点运算符作为剩余参数-理解为把剩余的元素集合在一起 //这里的10 20 30 分别传到函数作为形参,形参只有a和...rest,那么...rest其实就是把剩余的20 30集合一起接收了,变为了[20,30] function func2(a, ...rest) { console.log(a); //10 console.log(rest); //[20,30] console.log(rest[0], rest[1