可以,举例如下:
let arr = [1,2,3];
let newArr = arr.concat(5,6,7,
8)
console.log(newArr);
当程序运行时,控制台会正常输出[1,2,3,5,6,7,8]
可以,举例如下:
let arr = [1,2,3];
let newArr = arr.concat(5,6,7,
8)
console.log(newArr);
当程序运行时,控制台会正常输出[1,2,3,5,6,7,8]