[javascript] 객체

객체의 선언과 호출 객체는 하나의 이름에 여러 종류의 값을 넣을 수 있게 해준다. const yeji = { name: '황예지', age: 22, position: 'leader' }; const ryujin = { name: '신류진', age: 21, position: 'center' }; console.log(yeji.name); // return 황예지 console.log(yeji.age); // return 22 console.log(ryujin.position); // return center yeji라는 객체에 name이라는 값이 존재하듯이, console.log()는 console이라는 객체에 log라는 함수가 존재하는 것으로 이해할 수 있다. 객체 비구조화 할당(객체 구조 분해) yeji 내부의 값을 조회할 때마다 yeji....

December 19, 2021 · 1 min · Me