객체의 비구조화
![[Vue] Vuex 시작하기 전에...](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdgfRNY%2FbtqIBOcIpOC%2FamGk6gJJYWbwLViBF0Y4Gk%2Fimg.png)
[Vue] Vuex 시작하기 전에...
🚗 ES6+ 에서 Obj를 간결하게 선언 const name = 'deok' const obj1 = { name: name, sayHello: function() { return `Hi my name is ${this.name}` } } const obj2 = { name, sayHello() { return `Hi my name is ${this.name}` } } obj1과 ob2는 완전히 같다. 🚓 객체의 비구조화(destructuring) const student = { name: 'deok', email: 'deok@deok.com', phone: '01012345678' } // 1번 // const name = student.name // const email = student.email /..