Skip to content
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