[JAVASCRIPT] 구조 분해 할당, 전개 연산자, 불변성, 얕은 복사 깊은 복사
구조 분해 할당 (Destructuring assignment) const user = { name: 'kim', age: 85, email: 'test@gmail.com' } const {name, age, email, address='Korea'} = user 전개 연산자 (Spread) const fruits = ['Apple', 'Banana', 'Cherry'] console.log(...fruits) // Apple Banana Cherry 데이터 불변성 (Immutability) 원시 데이터: String, Number, Boolean, undefined, null 참조형 데이터: Object, Array, Function 얕은 복사(Shallow copy): 객체를 복사할 때 원래값과 복사..
2023. 1. 25.