From cc28b31f501b06acb38aedcd4e3f5029ec838699 Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Wed, 2 Feb 2022 00:37:06 +0900 Subject: remove class 2 (#3923) --- .../reference/statements/async_function/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'files/ko/web/javascript/reference/statements/async_function/index.html') 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
async function name([param[, param[, ... param]]]) { +async function name([param[, param[, ... param]]]) { statements }@@ -63,13 +63,13 @@ translation_of: Web/JavaScript/Reference/Statements/async_function예를 들어
-async function foo() { +async function foo() { return 1 }위 코드는 아래와 같습니다.
-function foo() { +function foo() { return Promise.resolve(1) }@@ -77,13 +77,13 @@ translation_of: Web/JavaScript/Reference/Statements/async_function예를 들어
-async function foo() { +async function foo() { await 1 }위 코드는 아래와 같습니다.
-function foo() { +function foo() { return Promise.resolve(1).then(() => undefined) }@@ -92,7 +92,7 @@ translation_of: Web/JavaScript/Reference/Statements/async_functionSimple example
-var resolveAfter2Seconds = function() { +
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
{{jsxref("Promise")}} 를 반환하는 API는 promise chain을 만들며 여러 파트의 함수로 나뉜다.
-
아래 코드를 보자.function getProcessedData(url) { +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위의 코드는 하나의 async함수로 아래와 같이 쓰여질 수도 있다.
-async function getProcessedData(url) { +async function getProcessedData(url) { let v; try { v = await downloadData(url); -- cgit v1.2.3-54-g00ecf