Skip to content

Commit 543ff08

Browse files
author
root
committed
Translation task and solution 9 in Numbers
1 parent a9008ca commit 543ff08

File tree

1 file changed

+6
-6
lines changed
  • 1-js/05-data-types/02-number/9-random-int-min-max

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
importance: 2
1+
nilai penting: 2
22

33
---
44

5-
# A random integer from min to max
5+
# Sebuah integer acak dari min ke max
66

7-
Create a function `randomInteger(min, max)` that generates a random *integer* number from `min` to `max` including both `min` and `max` as possible values.
7+
Buatlah sebuah fungsi `randomInteger(min, max)` yang menghasilkan angka *integer* acak dari `min` ke `max` termasuk keduanya `min` dan `max` sebagai nilai yang mungkin.
88

9-
Any number from the interval `min..max` must appear with the same probability.
9+
Angka apa pun dari interval `min..max` harus muncul dengan probabilitas yang sama.
1010

1111

12-
Examples of its work:
12+
Contoh kerjanya:
1313

1414
```js
1515
alert( randomInteger(1, 5) ); // 1
1616
alert( randomInteger(1, 5) ); // 3
1717
alert( randomInteger(1, 5) ); // 5
1818
```
1919

20-
You can use the solution of the [previous task](info:task/random-min-max) as the base.
20+
Anda dapat menggunakan solusi dari [tugas sebelumnya](info:task/random-min-max) sebagai basis.

0 commit comments

Comments
 (0)