// contact和push的区别---------------------------
// contact会返回一个新的数组
const arr = [1, 2, 3]
const arr2 = arr.concat(4)
console.log(arr)
console.log(arr2)
console.log(arr2 === arr) // false
const arr3 = [1, 2, 3]
const arr4 = arr3.concat([4, 5, 6])
console.log(arr3)
console.log(arr4)
console.log(arr4 === arr3) //false
arr4.length = 0
console.log(arr4)