Object 메서드
const newObj = Object.assign(obj1, obj2)cosnt obj1 = {a: 1, b: 2}
cosnt obj2 = {c: 3, d: 4}
const newObj = Object.assign(obj1, obj2)
newObj // {a: 1, b: 2, c: 3, d: 4}
obj1 // {a: 1, b: 2, c: 3, d: 4}
obj2 // {c: 3, d: 4}Last updated
const newObj = Object.assign(obj1, obj2)cosnt obj1 = {a: 1, b: 2}
cosnt obj2 = {c: 3, d: 4}
const newObj = Object.assign(obj1, obj2)
newObj // {a: 1, b: 2, c: 3, d: 4}
obj1 // {a: 1, b: 2, c: 3, d: 4}
obj2 // {c: 3, d: 4}Last updated