Skip to content

Commit 2a6f069

Browse files
committed
feat(i18n): 1.02.13.1
1 parent 2679ca4 commit 2a6f069

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

1-js/02-first-steps/13-switch/1-rewrite-switch-if-else/solution.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
To precisely match the functionality of `switch`, the `if` must use a strict comparison `'==='`.
1+
Supaya fungsionalitas `switch` persis sama, `if` harus memakai pembandingan ketat `'==='`.
22

3-
For given strings though, a simple `'=='` works too.
3+
Tapi untuk string yang diberikan, `'=='` sederhana cukup bekerja juga.
44

55
```js no-beautify
66
if(browser == 'Edge') {
@@ -15,6 +15,6 @@ if(browser == 'Edge') {
1515
}
1616
```
1717

18-
Please note: the construct `browser == 'Chrome' || browser == 'Firefox' …` is split into multiple lines for better readability.
18+
Tolong ingat: konstruksi `browser == 'Chrome' || browser == 'Firefox' …` dipecah menjadi beberapa baris untuk kemudahan keterbacaan.
1919

20-
But the `switch` construct is still cleaner and more descriptive.
20+
Tapi konstruksi `switch` masih lebih bersih dan lebih deskriptif.

1-js/02-first-steps/13-switch/1-rewrite-switch-if-else/task.md

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

33
---
44

5-
# Rewrite the "switch" into an "if"
5+
# Tulis kembali "switch" menjadi "if"
66

7-
Write the code using `if..else` which would correspond to the following `switch`:
7+
Tulis kode menggunakan `if..else` yang akan berkorespon dengan `switch` berikut:
88

99
```js
1010
switch (browser) {

1-js/02-first-steps/13-switch/2-rewrite-if-switch/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The first two checks turn into two `case`. The third check is split into two cases:
1+
Dua cek pertama berubah ke `case`. Cek ketiga dipecah menjadi dua case:
22

33
```js run
44
let a = +prompt('a?', '');
@@ -21,6 +21,6 @@ switch (a) {
2121
}
2222
```
2323

24-
Please note: the `break` at the bottom is not required. But we put it to make the code future-proof.
24+
Tolong ingat: `break` di paling bawah tidak wajib. Tapi kita taruh itu supaya kodenya future-proof.
2525

26-
In the future, there is a chance that we'd want to add one more `case`, for example `case 4`. And if we forget to add a break before it, at the end of `case 3`, there will be an error. So that's a kind of self-insurance.
26+
Di masa depan, ada kans bahwa kita ingin menambah `case` lebih, misalnya `case 4`. Dan jika kita lupa menambah break sebelum itu, di akhir `case 3`, akan ada error. Jadi itu lebih ke semacam asuransi diri.

1-js/02-first-steps/13-switch/2-rewrite-if-switch/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
importance: 4
1+
nilai penting: 4
22

33
---
44

5-
# Rewrite "if" into "switch"
5+
# Tulis kembali "if" ke dalam "switch"
66

7-
Rewrite the code below using a single `switch` statement:
7+
Tulis ulang kode berikut menggunakan pernyataan `switch` tunggal:
88

99
```js run
1010
let a = +prompt('a?', '');

0 commit comments

Comments
 (0)