js two array concatenation

The most common way to connect two arrays is to load data from the drop-down on the mobile phone, and the old data cannot be deleted, only two lists can be connected

the first method:

this.list = this.list.concat(tmpList)

There is another way:

this.list = [...this.list,...tmpList]

This method is a deep copy

Guess you like

Origin blog.csdn.net/TKP666/article/details/128896710