💡 객체 합치는 4가지 방법 1. 반복문 2. Object.assign() 3. Spread Operator 4. lodash 라이브러리 반복문 const fruitA = { name: 'apple', color: 'red' }; const fruitB = { name: 'apple', color: 'green', price: 1000}; const fruit = {}; for(let a in fruitA) { fruit[a] = fruitA[a]; } for(let b in fruitB) { fruit[b] = fruitB[b]; } console.log(fruit); // { name: 'apple', color: 'green', price: 1000 } 다음 예시는 fruitA 객체에 fruitB ..