diff options
author | 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> | 2022-02-02 00:37:06 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 00:37:06 +0900 |
commit | cc28b31f501b06acb38aedcd4e3f5029ec838699 (patch) | |
tree | 4410c7b0233b89526f4011754bc3363303b07e74 /files/ko/web/javascript/reference/statements/async_function | |
parent | 568ac50597a603f2a7af40c87edbe064b3b14564 (diff) | |
download | translated-content-cc28b31f501b06acb38aedcd4e3f5029ec838699.tar.gz translated-content-cc28b31f501b06acb38aedcd4e3f5029ec838699.tar.bz2 translated-content-cc28b31f501b06acb38aedcd4e3f5029ec838699.zip |
remove class 2 (#3923)
Diffstat (limited to 'files/ko/web/javascript/reference/statements/async_function')
-rw-r--r-- | files/ko/web/javascript/reference/statements/async_function/index.html | 16 |
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(() => 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 => { 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 => { 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); |