typescript 阵列扩散操作器(Concat)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript 阵列扩散操作器(Concat)相关的知识,希望对你有一定的参考价值。

// two different arrays
const port_list = ['21', '22', '80'];
const port_list_new = ['8080'];

// copy items in one array
const ports = [...port_list, ...port_list_new]

console.log(ports)

以上是关于typescript 阵列扩散操作器(Concat)的主要内容,如果未能解决你的问题,请参考以下文章