티스토리 뷰

일반 객체는 호출이 불가하다.

하지만 함수 객체는 호출이 가능하다.

 

더불어 함수 객체는 함수 고유의 프로퍼티를 소유한다.

 

브라우저 콘솔에서 console.dir 메서드를 이용하면 확인할 수 있다.

 

console.dir() - Web APIs | MDN

The method console.dir() displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.

developer.mozilla.org

console.dir

 

add 함수의 모든 프로퍼티 어트리뷰트는 Object.getOwnPropertyDescriptors로 확인할 수 있다.

 

기록된 arguments, caller, length, name, prototype 프로퍼티는 모두 데이터 프로퍼티다.

이 프로퍼티는 함수 객체 고유의 프로퍼티다.

 

해당 프로퍼티에 대해서는 다음 포스팅에 차례로 서술하겠다.

 

'Oops, All Code! > 📝 Study Notes' 카테고리의 다른 글

[JS] name 프로퍼티  (0) 2023.03.17
[JS] length 프로퍼티  (0) 2023.03.16
[JS] 일급 객체  (0) 2023.03.13
[React] React의 탄생  (0) 2023.03.12
[JS] 빌트인 함수와 new 연산자  (0) 2023.03.12
댓글