天天看点

js中[ ].push(1,2,3)为啥是3而不是个新数组

关于push:

        js中push直接赋值时,push() 方法可向数组的末尾添加一个或多个元素,并返回新的长度。

let a = []
a = [...a,1]