내부 슬롯과 내부 메서드


프로퍼티 어트리뷰트와 프로퍼티 디스크립터 객체


데이터 프로퍼티와 접근자 프로퍼티

데이터 프로퍼티

const person = {
	name: 'Lee'
};

// 프로퍼티 어트리뷰트 정보를 제공하는 프로퍼티 디스크립터 객체를 취득한다.
console.log(Object.getOwnPropertyDescriptor(person, 'name'));
// {value: 'Lee', writable: true, enumerable: true, configurable: true}

// 프로퍼티 어트리뷰트 [[Value]]의 값 ⇒ ‘Lee’
// [[writable]], [[enumerable]], [[configurable]]의 값 ⇒ true