Skip to content

Commit

Permalink
[ko] add translation for console api in Web API (#16584)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykss committed Oct 25, 2023
1 parent 7a7d399 commit ce945de
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions files/ko/web/api/console_api/index.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
---
title: Console API
slug: Web/API/Console_API
l10n:
sourceCommit: bb9dfcdb1638dd0b0883903af82c0359b0a95a0d
---

{{DefaultAPISidebar("Console API")}}

**Console API**는 코드의 특정 지점에서 값이나 변수를 기록하고, 작업의 소요 시간을 알아내는 등 개발자가 사용할 수 있는 디버깅 기능을 제공합니다.
**Console API**개발자가 코드의 설정 지점에서 메시지나 변수 값을 로깅 하거나, 작업 완료에 걸리는 시간을 측정하는 등의 디버깅 작업을 수행할 수 있는 기능을 제공합니다.

## 개념과 사용법
{{AvailableInWorkers}}

Console API는 사유 API로 시작하였으며, 브라우저가 각자 다른 구현을 했습니다. 이후 [Console API 명세](https://console.spec.whatwg.org/)가 만들어져 일관적인 동작 방식을 정의하였으며, 결국 모든 최신 브라우저가 같은 동작을 따르게 되었습니다. 그러나 일부 구현체는 여전히 자신만의 사유 함수를 가지고 있습니다. 다음 링크에서 알아보세요.
## 개념 및 사용법

- [Google Chrome DevTools implementation](https://developers.google.com/chrome-developer-tools/docs/console-api)
- [Safari DevTools implementation](https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Console/Console.html)
Console API는 처음에는 대부분 자체 개발 API로 시작되었으며, 브라우저마다 구현 방식이 다르고 일관성이 없었습니다. [콘솔 API 명세](https://console.spec.whatwg.org/)는 일관된 동작을 정의하기 위해 만들어졌으며, 모든 최신 브라우저는 결국 일관된 동작을 구현하기로 했지만, 일부 구현에는 여전히 자체적인 추가 함수가 있습니다. 여기에서 자세히 알아보세요.

사용은 매우 간단합니다. {{domxref("Window.console")}}, 워커에서는 {{domxref("WorkerGlobalScope.console")}}, 아니면 그냥 `console`로 접근 가능한 {{domxref("console")}} 객체는 브라우저의 [웹 콘솔](/ko/docs/Tools/Web_Console)에 값을 기록하는 등 기초적인 디버깅 작업에 사용할 수 있는 메서드를 제공합니다.
- [Google Chrome 개발자도구 구현](https://developers.google.com/chrome-developer-tools/docs/console-api)
- [Safari 개발자도구 구현](https://developer.apple.com/library/safari/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Console/Console.html)

가장 자주 쓰이는 메서드는 {{domxref("console.log()")}}이며, 변수의 값을 기록할 때 사용합니다.
사용법은 매우 간단합니다. the {{domxref("console")}} 객체에는 일반적으로 브라우저의 [웹 콘솔](https://firefox-source-docs.mozilla.org/devtools-user/web_console/index.html)에 다양한 값을 로깅 하는 데 중점을 두고 있고, 기초적인 디버깅 작업을 수행하기 위해 호출할 수 있는 많은 메서드가 포함되어 있습니다.

가장 일반적으로 사용되는 메서드는 {{domxref("console.log")}}이며, 특정 변수 안에 포함된 현재 값을 기록하는 데 사용됩니다.

## 인터페이스

Expand All @@ -28,11 +32,11 @@ Console API는 사유 API로 시작하였으며, 브라우저가 각자 다른
```js
let myString = "Hello world";

// Output "Hello world" to the console
// 콘솔에 "Hello world"가 출력됩니다
console.log(myString);
```

{{domxref("console")}} 문서의 [예제](/ko/docs/Web/API/Console#예제) 항목에서 더 많은 예제를 확인하세요.
더 많은 예제는 [console](/ko/docs/Web/API/console#usage) 문서를 참조하세요.

## 명세

Expand All @@ -44,6 +48,6 @@ console.log(myString);

## 같이 보기

- [Firefox Developer Tools](/ko/docs/Tools)
- [Web Console](/ko/docs/Tools/Web_Console)how the Web Console in Firefox handles console API calls
- [Remote debugging](/ko/docs/Tools/Remote_Debugging)how to see console output when the debugging target is a mobile device
- [Tools](https://firefox-source-docs.mozilla.org/devtools-user/index.html)
- [Web Console](https://firefox-source-docs.mozilla.org/devtools-user/web_console/index.html)Firefox의 웹 콘솔이 콘솔 API 호출을 처리하는 방법
- [about:debugging](https://firefox-source-docs.mozilla.org/devtools-user/about_colon_debugging/index.html)디버깅 대상이 모바일 디바이스인 경우 콘솔 출력을 확인하는 방법

0 comments on commit ce945de

Please sign in to comment.