console.dir()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
console.dir()
메서드는 주어진 JavaScript 객체 속성을 인터랙티브한 목록으로 표시합니다.
출력된 결과는 자식 객체의 내용을 볼 수 있는 여닫는 삼각형과 함께 계층적인 목록으로 나타납니다.
다시 말해, console.dir()
은 주어진 JavaScript 객체의 모든 속성을 콘솔에서 볼 수 있는 방법으로서
이를 사용하면 개발자가 객체의 속성을 쉽게 확인할 수 있습니다.
참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.
구문
js
dir(object)
매개변수
object
-
출력하고 싶은 속성을 포함한 JavaScript 객체
반환 값
None (undefined
).
명세
Specification |
---|
Console # dir |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dir() static method | ||||||||||||||
options.colors parameter | ||||||||||||||
options.depth parameter | ||||||||||||||
options.showHidden parameter |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Non-standard. Check cross-browser support before using.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.