Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
Console API는 개발자가 코드의 설정 지점에서 메시지나 변수 값을 로깅 하거나, 작업 완료에 걸리는 시간을 측정하는 등의 디버깅 작업을 수행할 수 있는 기능을 제공합니다.
참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.
Console API는 처음에는 대부분 자체 개발 API로 시작되었으며, 브라우저마다 구현 방식이 다르고 일관성이 없었습니다. 콘솔 API 명세는 일관된 동작을 정의하기 위해 만들어졌으며, 모든 최신 브라우저는 결국 일관된 동작을 구현하기로 했지만, 일부 구현에는 여전히 자체적인 추가 함수가 있습니다. 여기에서 자세히 알아보세요.
사용법은 매우 간단합니다. the console 객체에는 일반적으로 브라우저의 웹 콘솔에 다양한 값을 로깅 하는 데 중점을 두고 있고, 기초적인 디버깅 작업을 수행하기 위해 호출할 수 있는 많은 메서드가 포함되어 있습니다.
가장 일반적으로 사용되는 메서드는 console.log이며, 특정 변수 안에 포함된 현재 값을 기록하는 데 사용됩니다.
로깅, 스택 추적, 타이머, 카운터 등 기초적인 디버깅 기능을 제공합니다.
더 많은 예제는 console 문서를 참조하세요.
| Console # console-namespace |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023년 10월 25일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.