const a = [1,2,3]
const b = [4,5,6]
const c = [...a,...b,7,8,9]
const d = 'hello'
console.log(...a) //1,2,3
console.log(c) // [1,2,3,4,5,6,7,8,9]
console.log(d)// 'h','l','l','o'
const a = [1,2,3]
const b = [6,7,8]
console.log([...a,4,5,6,...b]) // [1,2,3,4,5,6,7,8]
const a = [1,2,3]
const b = [...a]
b.push(4)
console.log(a,b) // [1,2,3] [1,2,3,4]
const a =[[1,2],[3,4]]
const b = [...a]
b[0].push(3)
console.log(a) // [[1,2,3],[3,4]]
console.log(b) // [[1,2,3],[3,4]]
오 이런 기능도 있어요? ES6 인가 봐요...?