Skip to content

Commit b7a2a0c

Browse files
singularity-codeViolet-Bora-Lee
authored andcommitted
#16 Advanced Functions 번역 01 - 05 (#18)
* Recursion And Stack Translation * Recursion And Stack Translation Typo * Rest Parameters & Spread Operator * Closure Draft * Closure Draft * Var Draft * Global Object Draft * Global Object Draft Fix * Fix Recursion * #16 Typo * #16 Typo Closure * #16 Recursion Tasks * #16 Closure Tasks * #16 Old var * #16 Function-Object and New Function * #16 Typo 매개변수 * #16 Typo * #16 Grammar - Recursion * #16 Grammar - Removing "We" * #16 Review - Recursion * #16 Review - Rest Parameters * #16 Review - Old Var * #16 Review - Global Obj * #16 Review - Closure * #16 Review - Closure Tasks * #16 직역수정 * #16 직역수정 * #16 Undo 6 & 7 * #16 Recusion 직역수정 * #16 Recursion Tasks 직역수정 * #16 Recursion 직역수정 * #16 Rest Parameter 직역수정
1 parent 3dcc607 commit b7a2a0c

File tree

21 files changed

+578
-582
lines changed

21 files changed

+578
-582
lines changed

1-js/02-first-steps/04-variables/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
## 변수(variable)
1010

11-
[변수(variable)](https://en.wikipedia.org/wiki/Variable_(computer_science)) 는 데이터를 위한 "이름을 붙인 저장소" 입니다. 우리는 상품, 방문객 등의 데이터를 저장하기 위해 변수를 사용할 수 있습니다.
11+
[변수(variable)](https://en.wikipedia.org/wiki/Variable_(computer_science)) 는 데이터를 위한 "이름을 붙인 저장소" 입니다. 상품, 방문객 등의 데이터를 저장하기 위해 변수를 사용할 수 있습니다.
1212

1313
자바스크립트에선 변수를 생성할 때 `let` 키워드를 사용합니다.
1414

1-js/04-object-basics/02-garbage-collection/article.md

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

1515
예를 들어:
1616

17-
- 현재 함수의 지역 변수와 매개 변수
18-
- 중첩된 함수 호출로 실행된 경우 현재 스코프 체인에 있는 변수와 매개 변수
17+
- 현재 함수의 지역 변수와 매개변수
18+
- 중첩된 함수 호출로 실행된 경우 현재 스코프 체인에 있는 변수와 매개변수
1919
- 전역 변수
2020
- (내부적인 다른 값들도 존재합니다.)
2121

1-js/04-object-basics/04-object-methods/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ user.sayHi = function() {
3232
user.sayHi(); // Hello!
3333
```
3434

35-
여기서 우리는 함수를 만들기 위해서 Function 표현을 사용했습니다. 그리고 객체의 `user.sayHi` 속성에 이것을 할당해 줬습니다.
35+
여기서 함수를 만들기 위해서 Function 표현을 사용했습니다. 그리고 객체의 `user.sayHi` 속성에 이것을 할당해 줬습니다.
3636

3737
그리고서 이것을 호출할 수 있죠. 이제는 user가 말할 수 있습니다!
3838

3939
객체의 속성인 함수를 *메서드*라고 부릅니다.
4040

41-
즉, 여기서 우리는 `user`안에 `sayHi`메서드를 가진 것이죠.
41+
즉, 여기서 `user`안에 `sayHi`메서드를 가진 것이죠.
4242

4343
물론, 미리 선언된 함수를 메서드로 사용할 수 있습니다. 이렇게요:
4444

1-js/06-advanced-functions/01-recursion/01-sum-to/task.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 5
22

33
---
44

5-
# Sum all numbers till the given one
5+
# 주어진 숫자까지 모든 숫자를 합해보세요.
66

7-
Write a function `sumTo(n)` that calculates the sum of numbers `1 + 2 + ... + n`.
7+
숫자`1 + 2 + ... + n`의 합을 계산하는 함수`sumTo (n)`을 작성하세요.
88

9-
For instance:
9+
예를들면
1010

1111
```js no-beautify
1212
sumTo(1) = 1
@@ -17,20 +17,20 @@ sumTo(4) = 4 + 3 + 2 + 1 = 10
1717
sumTo(100) = 100 + 99 + ... + 2 + 1 = 5050
1818
```
1919

20-
Make 3 solution variants:
20+
3 가지 솔루션 변형 만들기
2121

22-
1. Using a for loop.
23-
2. Using a recursion, cause `sumTo(n) = n + sumTo(n-1)` for `n > 1`.
24-
3. Using the [arithmetic progression](https://en.wikipedia.org/wiki/Arithmetic_progression) formula.
22+
1. for 반복문 사용.
23+
2. 재귀를 사용하면`n> 1`에 대해`sumTo (n) = n + sumTo (n-1)`이 됩니다.
24+
3. [산술 진행](https://en.wikipedia.org/wiki/Arithmetic_progression) 공식사용.
2525

26-
An example of the result:
26+
결과의 예
2727

2828
```js
2929
function sumTo(n) { /*... your code ... */ }
3030

3131
alert( sumTo(100) ); // 5050
3232
```
3333

34-
P.S. Which solution variant is the fastest? The slowest? Why?
34+
P.S. 어떤 솔루션 변형이 가장 빠릅니까? 가장 느린 것은 어떤 것 입니까? 왜 그럴까요?
3535

36-
P.P.S. Can we use recursion to count `sumTo(100000)`?
36+
P.P.S. 재귀를 사용하여 `sumTo (100000)`를 계산할 수 있습니까?
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
importance: 4
22

33
---
4+
# 계승 계산
45

5-
# Calculate factorial
6+
자연수의 [계승](https://en.wikipedia.org/wiki/Factorial) (factorialial)은 숫자에 "1"을 곱한 다음 숫자를 2 "등으로 곱한 다음 1까지 계속됩니다. 'n'의 계승은`n! '으로 표시됩니다.
67

7-
The [factorial](https://en.wikipedia.org/wiki/Factorial) of a natural number is a number multiplied by `"number minus one"`, then by `"number minus two"`, and so on till `1`. The factorial of `n` is denoted as `n!`
8-
9-
We can write a definition of factorial like this:
8+
계승의 정의는 다음과 같이 쓸 수 있습니다
109

1110
```js
1211
n! = n * (n - 1) * (n - 2) * ...*1
1312
```
1413

15-
Values of factorials for different `n`:
14+
'n'에 대한 계승의 다른 값
1615

1716
```js
1817
1! = 1
@@ -22,10 +21,10 @@ Values of factorials for different `n`:
2221
5! = 5 * 4 * 3 * 2 * 1 = 120
2322
```
2423

25-
The task is to write a function `factorial(n)` that calculates `n!` using recursive calls.
24+
재귀인 방법을 사용하여`n! '을 계산하는`factorial (n)`함수를 작성하세요.
2625

2726
```js
2827
alert( factorial(5) ); // 120
2928
```
3029

31-
P.S. Hint: `n!` can be written as `n * (n-1)!` For instance: `3! = 3*2! = 3*2*1! = 6`
30+
P.S. 힌트 :`n!``n * (n-1)! '로 쓸 수 있습니다! 예를 들면`3! = 3 * 2! = 3 * 2 * 1! = 6`
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
importance: 5
22

33
---
4+
# 피보나치 수
45

5-
# Fibonacci numbers
6+
피보나치 수는 다음과 같은 공식을 가집니다 [Fibonacci numbers](https://en.wikipedia.org/wiki/Fibonacci_number)
7+
<code>F<sub>n</sub> = F<sub>n-1</sub> + F<sub>n-2</sub></code>. 즉, 다음 숫자는 앞의 두 숫자의 합계입니다.
68

7-
The sequence of [Fibonacci numbers](https://en.wikipedia.org/wiki/Fibonacci_number) has the formula <code>F<sub>n</sub> = F<sub>n-1</sub> + F<sub>n-2</sub></code>. In other words, the next number is a sum of the two preceding ones.
9+
처음 두 숫자는`1`,`2 (1 + 1)`,`3 (1 + 2)`,`5 (2 + 3)`등등입니다 :`1, 1, 2, 3, 5 , 8, 13, 21 ...`.
810

9-
First two numbers are `1`, then `2(1+1)`, then `3(1+2)`, `5(2+3)` and so on: `1, 1, 2, 3, 5, 8, 13, 21...`.
11+
피보나치 수는 [황금 비율](https://en.wikipedia.org/wiki/Golden_ratio)과 우리 주변의 많은 자연 현상과 관련이 있습니다.
1012

11-
Fibonacci numbers are related to the [Golden ratio](https://en.wikipedia.org/wiki/Golden_ratio) and many natural phenomena around us.
13+
`n 번째 '피보나치 수를 반환하는 함수`fib (n)'을 작성하세요.
1214

13-
Write a function `fib(n)` that returns the `n-th` Fibonacci number.
14-
15-
An example of work:
15+
예를 들면
1616

1717
```js
1818
function fib(n) { /* your code */ }
@@ -22,4 +22,4 @@ alert(fib(7)); // 13
2222
alert(fib(77)); // 5527939700884757
2323
```
2424

25-
P.S. The function should be fast. The call to `fib(77)` should take no more than a fraction of a second.
25+
P.S. 이 기능은 빠릅니다. `fib (77)`에 대한 호출은 1 초도 걸리지 않습니다.

1-js/06-advanced-functions/01-recursion/04-output-single-linked-list/task.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
importance: 5
22

33
---
4+
# 단일 연결 리스트 출력하기
45

5-
# Output a single-linked list
6-
7-
Let's say we have a single-linked list (as described in the chapter <info:recursion>):
6+
단일 연결 리스트가 있다고 가정 해 봅니다 (<info:recursion>):
87

98
```js
109
let list = {
@@ -22,8 +21,8 @@ let list = {
2221
};
2322
```
2423

25-
Write a function `printList(list)` that outputs list items one-by-one.
24+
목록 항목을 하나씩 출력하는`printList (list)`함수를 작성해보세요.
2625

27-
Make two variants of the solution: using a loop and using recursion.
26+
반목문을 사용하고 재귀적인 방법을 사용해서 두 가지로 접근해봅니다.
2827

29-
What's better: with recursion or without it?
28+
어떤 게 더 좋은 코드인가요? 재귀가 있는 것인가요? 없는 것인가요?
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
importance: 5
22

33
---
4+
# 단일 연결 리스트를 역순으로 출력하기
45

5-
# Output a single-linked list in the reverse order
6+
이전 작업의 단일 연결 목록을 역순으로 출력합니다. <info:task/output-single-linked-list>
67

7-
Output a single-linked list from the previous task <info:task/output-single-linked-list> in the reverse order.
8-
9-
Make two solutions: using a loop and using a recursion.
8+
반목 문을 사용하는 것과 재귀적인 방법을 사용하는 것 두 가지를 만들어보세요.

0 commit comments

Comments
 (0)