object

· JAVASCRIPT
표준내장객체 (standard built-in object) Object에 관한 것을 정리했다. 이는 일부일 뿐이니 자세한 내용은 mdn 문서를 참조하자. // Object.assign() // 하나 이상의 출처(Source) 객체로부터 대상(Target) 객체로 속성을 복사하고 대상 객체를 반환 const target = {a:1, b:2}; const source1 = {b:3, c:4}; const source2 = {c:5, d:6}; const result = Object.assign(target, source1, source2); const result2 = Object.assign({}, target, source1, source2); const result3 = { ...target, ....