Skip to content

Commit

Permalink
[신규 번역] 숫자쳥 네번째 과제 번역 javascript-tutorial#1711 (javascript-tutorial#1715
Browse files Browse the repository at this point in the history
)

* [숫자형] 과제4 문제 제목 번역

* [숫자형] 과제4 문제 본문 번역

* [숫자형] 과제4 해답 번역 - 1

* [숫자형] 과제4 해답 번역 - 2

* [숫자형] 과제4 해답 번역 - 3

* [숫자형] 과제4 해답 번역 - 4

* [숫자형] 과제4 해답 번역 - 5
  • Loading branch information
Violet-Bora-Lee authored Nov 25, 2023
1 parent e400ec5 commit ddf708a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions 1-js/05-data-types/02-number/4-endless-loop-error/solution.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
That's because `i` would never equal `10`.
`i`는 절대 `10`이 될 수 없어서 무한 루프가 발생합니다.

Run it to see the *real* values of `i`:
코드를 실행해 실제 `i` 값을 확인해 봅시다.

```js run
let i = 0;
Expand All @@ -10,8 +10,8 @@ while (i < 11) {
}
```

None of them is exactly `10`.
어떤 경우에도 `i``10`이 될 수 없습니다.

Such things happen because of the precision losses when adding fractions like `0.2`.
이런 일이 발생하는 이유는 `0.2`와 같은 분수를 더할 때 정밀도 손실이 발생하기 때문입니다.

Conclusion: evade equality checks when working with decimal fractions.
그러므로 소수나 분수를 대상으로 작업 할 땐 등호 비교를 피하세요.
4 changes: 2 additions & 2 deletions 1-js/05-data-types/02-number/4-endless-loop-error/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 4

---

# An occasional infinite loop
# 무한 루프

This loop is infinite. It never ends. Why?
아래 반복문은 무한대로 작동합니다. 왜 그럴까요?

```js
let i = 0;
Expand Down

0 comments on commit ddf708a

Please sign in to comment.