aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/statements/async_function/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/javascript/reference/statements/async_function/index.html')
-rw-r--r--files/ko/web/javascript/reference/statements/async_function/index.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/files/ko/web/javascript/reference/statements/async_function/index.html b/files/ko/web/javascript/reference/statements/async_function/index.html
index c1827af8e2..a2dd584d1f 100644
--- a/files/ko/web/javascript/reference/statements/async_function/index.html
+++ b/files/ko/web/javascript/reference/statements/async_function/index.html
@@ -19,7 +19,7 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<h2 id="Syntax">Syntax</h2>
-<pre class="syntaxbox notranslate">async function <em>name</em>([<em>param</em>[, <em>param</em>[, ... <em>param</em>]]]) {
+<pre class="syntaxbox">async function <em>name</em>([<em>param</em>[, <em>param</em>[, ... <em>param</em>]]]) {
<em>statements</em>
}
</pre>
@@ -63,13 +63,13 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<p>예를 들어</p>
-<pre class="notranslate">async function foo() {
+<pre >async function foo() {
return 1
}</pre>
<p>위 코드는 아래와 같습니다.</p>
-<pre class="notranslate">function foo() {
+<pre >function foo() {
return Promise.resolve(1)
}</pre>
@@ -77,13 +77,13 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<p>예를 들어</p>
-<pre class="notranslate">async function foo() {
+<pre >async function foo() {
await 1
}</pre>
<p>위 코드는 아래와 같습니다.</p>
-<pre class="notranslate">function foo() {
+<pre >function foo() {
return Promise.resolve(1).then(() =&gt; undefined)
}
</pre>
@@ -92,7 +92,7 @@ translation_of: Web/JavaScript/Reference/Statements/async_function
<h3 id="Simple_example">Simple example</h3>
-<pre class="notranslate"><code>var resolveAfter2Seconds = function() {
+<pre ><code>var resolveAfter2Seconds = function() {
console.log("starting slow promise");
return new Promise(resolve =&gt; {
setTimeout(function() {
@@ -169,7 +169,7 @@ setTimeout(parallel, 10000); // trully parallel: after 1 second, logs "fast", th
<p>{{jsxref("Promise")}} 를 반환하는 API는 promise chain을 만들며 여러 파트의 함수로 나뉜다.<br>
아래 코드를 보자.</p>
-<pre class="brush: js notranslate">function getProcessedData(url) {
+<pre class="brush: js ">function getProcessedData(url) {
return downloadData(url) // returns a promise
.catch(e =&gt; {
return downloadFallbackData(url) // returns a promise
@@ -182,7 +182,7 @@ setTimeout(parallel, 10000); // trully parallel: after 1 second, logs "fast", th
<p>위의 코드는 하나의 async함수로 아래와 같이 쓰여질 수도 있다.</p>
-<pre class="brush: js notranslate">async function getProcessedData(url) {
+<pre class="brush: js ">async function getProcessedData(url) {
let v;
try {
v = await downloadData(url);