Skip to content

Commit 0b0c678

Browse files
[프라미스] 과제 번역
- 충북대학교 git/GitHub 실습용 - 이슈 #473
1 parent 617d595 commit 0b0c678

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
The output is: `1`.
1+
`1`이 출력됩니다.
22

3-
The second call to `resolve` is ignored, because only the first call of `reject/resolve` is taken into account. Further calls are ignored.
3+
첫 번째 `reject/resolve` 호출만 고려대상이기 때문에 두 번째 `resolve`는 무시되기 때문입니다.

1-js/11-async/02-promise-basics/01-re-resolve/task.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
# Re-resolve a promise?
2+
# 두 번 resolve 하기?
33

44

5-
What's the output of the code below?
5+
아래 코드의 실행 결과를 예측해보세요.
66

77
```js
88
let promise = new Promise(function(resolve, reject) {

1-js/11-async/02-promise-basics/02-delay-promise/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function delay(ms) {
33
return new Promise(resolve => setTimeout(resolve, ms));
44
}
55

6-
delay(3000).then(() => alert('runs after 3 seconds'));
6+
delay(3000).then(() => alert('3초후 실행'));
77
```
88

9-
Please note that in this task `resolve` is called without arguments. We don't return any value from `delay`, just ensure the delay.
9+
답안에서 `resolve`가 인수 없이 호출되었다는 것에 주목해주시기 바랍니다. 함수 `delay`는 지연 확인 용이기 때문에 반환 값이 필요 없습니다.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
# Delay with a promise
2+
# 프라미스로 지연 만들기
33

4-
The built-in function `setTimeout` uses callbacks. Create a promise-based alternative.
4+
내장 함수 `setTimeout`은 콜백을 사용합니다. 프라미스를 기반으로 하는 동일 기능 함수를 만들어보세요.
55

6-
The function `delay(ms)` should return a promise. That promise should resolve after `ms` milliseconds, so that we can add `.then` to it, like this:
6+
함수 `delay(ms)`는 프라미스를 반환해야 합니다. 반환되는 프라미스는 아래와 같이 `.then`을 붙일 수 있도록 `ms` 이후에 이행되어야 합니다.
77

88
```js
99
function delay(ms) {
10-
// your code
10+
// 여기에 코드 작성
1111
}
1212

13-
delay(3000).then(() => alert('runs after 3 seconds'));
13+
delay(3000).then(() => alert('3초후 실행'));
1414
```
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
# Animated circle with promise
2+
# 프라미스로 애니메이션이 적용된 원 만들기
33

4-
Rewrite the `showCircle` function in the solution of the task <info:task/animate-circle-callback> so that it returns a promise instead of accepting a callback.
4+
<info:task/animate-circle-callback>에서 작성한 함수 `showCircle`를 다시 작성해봅시다. 이번엔 콜백을 받는 대신 프라미스를 반환하도록 해 봅시다.
55

6-
The new usage:
6+
함수는 다음처럼 사용할 수 있어야 합니다.
77

88
```js
99
showCircle(150, 150, 100).then(div => {
@@ -12,4 +12,4 @@ showCircle(150, 150, 100).then(div => {
1212
});
1313
```
1414

15-
Take the solution of the task <info:task/animate-circle-callback> as the base.
15+
콜백 기반으로 만든 답안인 <info:task/animate-circle-callback>를 참고하시기 바랍니다.

0 commit comments

Comments
 (0)