用於合併
兩個或多個陣列
這個方法不會改變原有陣列
會回傳一個新的陣列
array.concat(value1, value2, ..., valueN);
將下列陣列/值合併成一個陣列
const word = ['avocado','blueberry','cranberry']
const number = [100,200,900]
const seller = 'Amy'
const sellerNum = 12222
console.log(word.concat(number, seller, sellerNum))
// return ["avocado", "blueberry", "cranberry", 100, 200, 900, "Amy", 12222]