Skip to content

#1720 random-min-max 해답 번역 첫번째 줄 #1732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions 1-js/05-data-types/02-number/8-random-min-max/solution.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We need to "map" all values from the interval 0..1 into values from `min` to `max`.
우리는 0부터 1까지의 모든 값을 `min`부터 `max`까지의 범위로 '매핑' 해야합니다.

That can be done in two stages:

Expand All @@ -12,8 +12,7 @@ function random(min, max) {
return min + Math.random() * (max - min);
}

alert( random(1, 5) );
alert( random(1, 5) );
alert( random(1, 5) );
alert(random(1, 5));
alert(random(1, 5));
alert(random(1, 5));
```

2 changes: 1 addition & 1 deletion 1-js/05-data-types/02-number/8-random-min-max/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The built-in function `Math.random()` creates a random value from `0` to `1` (no

Write the function `random(min, max)` to generate a random floating-point number from `min` to `max` (not including `max`).

Examples of its work:
예시를 살펴봅시다.

```js
alert( random(1, 5) ); // 1.2345623452
Expand Down