Skip to content

Commit ec0fe61

Browse files
committed
Translation
Translation js/advanced-functions/settimeout-setinterval/...
1 parent 584a346 commit ec0fe61

File tree

5 files changed

+117
-117
lines changed

5 files changed

+117
-117
lines changed

1-js/06-advanced-functions/08-settimeout-setinterval/1-output-numbers-100ms/solution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function printNumbers(from, to) {
1414
}, 1000);
1515
}
1616

17-
// usage:
17+
// penggunaan:
1818
printNumbers(5, 10);
1919
```
2020

@@ -34,13 +34,13 @@ function printNumbers(from, to) {
3434
}, 1000);
3535
}
3636

37-
// usage:
37+
// penggunaan:
3838
printNumbers(5, 10);
3939
```
4040

41-
Note that in both solutions, there is an initial delay before the first output. The function is called after `1000ms` the first time.
41+
Perhatikan dikedua solusinya, disana terdapat penundaan awal sebelum keluaran pertamanya. Fungsinya dipanggil setelah `1000ms` saat pertama kali.
4242

43-
If we also want the function to run immediately, then we can add an additional call on a separate line, like this:
43+
Jika kita juga ingin fungsinya untuk berjalan langsung, maka kita bisa menambahkan pemanggilan di baris yang berbeda, seperti ini:
4444

4545
```js run
4646
function printNumbers(from, to) {
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
importance: 5
1+
nilai penting: 5
22

33
---
44

5-
# Output every second
5+
# Membuat keluaran setiap detik
66

7-
Write a function `printNumbers(from, to)` that outputs a number every second, starting from `from` and ending with `to`.
7+
Tulis sebuah fungsi `printNumbers(from, to)` yang mengeluarkan angka setiap detik, dimulai dari `from` dan berakhir sampai `to`.
88

9-
Make two variants of the solution.
9+
Buatlah dua varian solusinya.
1010

11-
1. Using `setInterval`.
12-
2. Using nested `setTimeout`.
11+
1. Menggunakan `setInterval`.
12+
2. Gunakan `setTimeout` bercabang.

1-js/06-advanced-functions/08-settimeout-setinterval/4-settimeout-result/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
Any `setTimeout` will run only after the current code has finished.
2+
`setTimeout` apapun akan berjalan hanya setelah kode yang sedang berjalan saat ini telah selesai.
33

4-
The `i` will be the last one: `100000000`.
4+
`i`nya akan menjadi yang terakhir: `100000000`.
55

66
```js run
77
let i = 0;
88

99
setTimeout(() => alert(i), 100); // 100000000
1010

11-
// assume that the time to execute this function is >100ms
11+
// asumsikan waktu untuk mengeksekusi fungsi ini lebih dari 100ms
1212
for(let j = 0; j < 100000000; j++) {
1313
i++;
1414
}

1-js/06-advanced-functions/08-settimeout-setinterval/4-settimeout-result/task.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
importance: 5
1+
nilai penting: 5
22

33
---
44

5-
# What will setTimeout show?
5+
# Apa yang akan ditampilkan setTimeout?
66

7-
In the code below there's a `setTimeout` call scheduled, then a heavy calculation is run, that takes more than 100ms to finish.
7+
Di kode dibawah disana terdapat pemanggilan `setTimeout` yang sudah terjadwal, lalu kalkulasi yang cukup berat berjalan, yang memakan waktu lebih dari 100ms untuk selesai.
88

9-
When will the scheduled function run?
9+
Kapankan fungsi yang sudah dijadwal akan berjalan?
1010

11-
1. After the loop.
12-
2. Before the loop.
13-
3. In the beginning of the loop.
11+
1. Setelah perulangannya.
12+
2. Sebelum perulangannya.
13+
3. Di awal dari perulangannya.
1414

15-
16-
What is `alert` going to show?
15+
Apakan yang akan `alert` tampilkan?
1716

1817
```js
1918
let i = 0;
2019

2120
setTimeout(() => alert(i), 100); // ?
2221

23-
// assume that the time to execute this function is >100ms
22+
// asumsikan waktu untuk mengeksekusi fungsi ini lebih dari 100ms
2423
for(let j = 0; j < 100000000; j++) {
2524
i++;
2625
}

0 commit comments

Comments
 (0)