//剩余参数 function sum(...arr){ console.log(arr) } sum(3,4,5,6) // 求数组最大值 let arr = [1,44,7,88] console.log(Math.max(...arr)) //合并数组 let arr2 = [2,5,77] arr2= [...arr,...arr2] console.log(arr2)
标签:剩余,...,arr,console,函数,运算符,arr2,log From: https://www.cnblogs.com/xm666/p/17811472.html