有以下几种:
let array = [1, 2, 3];
array.push(4, 5, 6);
console.log(array); // 输出:[1, 2, 3, 4, 5, 6]
推荐的腾讯云相关产品:腾讯云云服务器(CVM),产品介绍链接地址:https://cloud.tencent.com/product/cvm
let array1 = [1, 2, 3];
let array2 = [4, 5, 6];
let newArray = array1.concat(array2);
console.log(newArray); // 输出:[1, 2, 3, 4, 5, 6]
推荐的腾讯云相关产品:腾讯云云函数(SCF),产品介绍链接地址:https://cloud.tencent.com/product/scf
let array1 = [1, 2, 3];
let array2 = [4, 5, 6];
let newArray = [...array1, ...array2];
console.log(newArray); // 输出:[1, 2, 3, 4, 5, 6]
推荐的腾讯云相关产品:腾讯云对象存储(COS),产品介绍链接地址:https://cloud.tencent.com/product/cos
let array = [1, 2, 3];
array.splice(1, 0, 4, 5, 6);
console.log(array); // 输出:[1, 4, 5, 6, 2, 3]
推荐的腾讯云相关产品:腾讯云数据库 MySQL 版(TencentDB for MySQL),产品介绍链接地址:https://cloud.tencent.com/product/cdb_mysql
领取专属 10元无门槛券
手把手带您无忧上云