개발 공부 기록

[Javascript] 객체 자세하게 출력하기 본문

개발/javascript

[Javascript] 객체 자세하게 출력하기

_김도연 2020. 8. 25. 13:47

[1, [2,[3, 4]],'hello', 'world', null] 의 값과 type, value, child의 구조를 갖는 Object를 만들었다고 했을 때, 각 명령어에 따른 출력은 다음과 같다.

console.log(object)​

console.dir(object, { depth: null })

 

console.dir(object, { depth: null }) 사용을 통해 객체를 상세하게 출력할 수 있다.

 

Comments