Skip to content

Commit c7c509e

Browse files
authored
Merge pull request #208 from juuni26/master
fix conflict and the leftover
2 parents 3f5ca2b + d7297a3 commit c7c509e

File tree

75 files changed

+188
-1634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+188
-1634
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,9 @@ Browser punya engine yang tertanam didalamnya yang disebut "JavaScript virtual m
2424

2525
Tiap engine punya *codename*-nya sendiri. Misalnya:
2626

27-
<<<<<<< HEAD
2827
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- di Chrome dan Opera.
2928
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- di Firefox.
3029
- ...Ada juga codename lain seperti "Trident" dan "Chakra" untuk versi berbeda dari IE, "ChakraCore" untuk Microsoft Edge, "Nitro" dan "SquirrelFish" untuk Safari, dll.
31-
=======
32-
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome and Opera.
33-
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
34-
- ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc.
35-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
3630

3731
Istilah di atas sebaiknya diingat karena akan sering digunakan dalam artikel para developer di internet. Kita akan menggunakannya juga. Misalnya, jika "fitur X didukung V8", kemungkinan ia bisa jalan di Chrome dan Opera.
3832

1-js/01-getting-started/2-manuals-specifications/article.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ Versi spesifikasi baru dirilis tiap tahun. Di antara rilis ini, draft spesifikas
1313

1414
Untuk membaca tentang fitur terkini, termasuk yang "hampir menjadi standar" (disebut "stage 3"), lihat proposalnya di <https://github.com/tc39/proposals>.
1515

16-
<<<<<<< HEAD
1716
Juga, jika kamu dalam pengembangan untuk peramban, maka ada spek lain yang dibahas di [bagian kedua](info:browser-environment) di tutorial ini.
18-
=======
19-
Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial.
20-
>>>>>>> 6ab384f2512902d74e4b0ff5a6be60e48ab52e96
2117

2218
## Manual
2319

1-js/01-getting-started/4-devtools/article.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ Supaya bisa melihat error dan memperoleh informasi berfaedah lainnya dari script
88

99
Kebanyakan pengembang memakai Chrome atau Firefox untuk pengembangan karena tools pengembangan yang mereka punya paling mantap. Peramban lain punya juga koq, ada with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific.
1010

11-
<<<<<<< HEAD
12-
Tools pengembang mengandung faedah; mereka punya banyak fitur. Untuk memulainya, kita akan belajar cara membuka mereka, mencari error, dan menjalankan perintah JavaScript.
13-
=======
14-
Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands.
15-
>>>>>>> 6ab384f2512902d74e4b0ff5a6be60e48ab52e96
11+
Tools pengembang mengandung banyak manfaat; mereka punya banyak fitur. Untuk memulainya, kita akan belajar cara membuka mereka, mencari error, dan menjalankan perintah JavaScript.
1612

1713
## Google Chrome
1814

1-js/02-first-steps/02-structure/article.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ alert(3 +
4646
+ 2);
4747
```
4848

49-
<<<<<<< HEAD
5049
Output dari kode itu adalah `6` karena JavaScript tak menyisipkan titik koma di sini. Sudah jelas sekali bahwa barisnya selesai dengan tanda plus `"+"`, sehingga itu menjadi "expresi tak lengkap", jadi tak butuh titik koma. Dan dalam hal ini memang seperti itu.
51-
=======
52-
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so a semicolon there would be incorrect. And in this case, that works as intended.
53-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
5450

5551
**Tapi ada situasi di mana JavaScript "gagal" mengasumsi titik koma di mana itu benar-benar dibutuhkan.**
5652

@@ -65,58 +61,36 @@ alert("Hello");
6561
[1, 2].forEach(alert);
6662
```
6763
68-
<<<<<<< HEAD
6964
Untuk sekarang tak usah memikirkan makna kurung siku `[]` dan `forEach`. Kita akan mempelajari mereka nanti. Untuk sekarang, ingat hasil kode tersebut: yaitu `1` lalu `2`.
7065
7166
Sekarang, ayo kita tambahkan `alert` sebelum kodenya *tanpa* diikuti titik koma:
72-
=======
73-
No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of running the code: it shows `Hello`, then `1`, then `2`.
74-
75-
Now let's remove the semicolon after the `alert`:
76-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
7767
7868
```js run no-beautify
7969
alert("Hello")
8070
8171
[1, 2].forEach(alert);
8272
```
8373
84-
<<<<<<< HEAD
8574
Sekarang jika kita menjalankan kodenya, hanya `alert` pertama yang tampil dan kemudian galat!
8675
8776
Tapi semua akan baik-baik saja jika kita menambahkan titik koma setelah `alert`:
8877
```js run
8978
alert("All fine now");
90-
=======
91-
The difference compared to the code above is only one character: the semicolon at the end of the first line is gone.
92-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
9379
9480
If we run this code, only the first `Hello` shows (and there's an error, you may need to open the console to see it). There are no numbers any more.
9581
96-
<<<<<<< HEAD
9782
Sekarang kita punya pesan "All fine now" diikuti dengan `1` dan `2`.
9883
9984
10085
Galat muncul pada varian tanpa titik koma karena JavaScript tak mengasumsikan titik koma sebelum kurung siku `[...]`.
10186
10287
Jadi, karena titik koma tidak otomatis disisipkan, kode di contoh pertama diperlakukan sebagai pernyataan tunggal. Inilah cara engine melihatnya:
103-
=======
104-
That's because JavaScript does not assume a semicolon before square brackets `[...]`. So, the code in the last example is treated as a single statement.
105-
106-
Here's how the engine sees it:
107-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
10888
10989
```js run no-beautify
11090
alert("Hello")[1, 2].forEach(alert);
11191
```
11292
113-
<<<<<<< HEAD
11493
Tapi itu harus jadi dua pernyataan terpisah, bukan satu. Penyatuan macam ini salah pada kasus ini, makanya galat. Ini bisa terjadi dalam situasi lain.
115-
=======
116-
Looks weird, right? Such merging in this case is just wrong. We need to put a semicolon after `alert` for the code to work correctly.
117-
118-
This can happen in other situations also.
119-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
12094
````
12195

12296
Kami sarankan menaruh titik koma di antara pernyataan meski mereka dipisahkan garis baru. Ini aturan yang diterima secara luas oleh komunitas. Harap diingat sekali lagi bahwa -- *bisa saja* menanggalkan titik koma di banyak kesempatan. Tapi akan lebih aman -- terutama untuk pemula -- untuk menggunakan mereka.

1-js/02-first-steps/05-types/article.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,10 @@ const bigInt = 1234567890123456789012345678901234567890n;
8181

8282
Sebenarnya `BigInt` jarang dibutuhkan, kita tidak akan mempelajarinya disini, tetapi akan dipisahkan didalam bagian <info:bigint>. Baca saja saat kamu membutuhkan nilai *integer* yang sangat panjang.
8383

84-
<<<<<<< HEAD
85-
<<<<<<< HEAD
84+
8685
```smart header="Masalah Kompabilitas"
8786
Sekarang `BigInt` sudah didukung oleh Firefox/Chrome/Edge, tapi tidak didalam Safari/Internet Explorer.
88-
=======
89-
```smart header="Compatibility issues"
90-
Right now `BigInt` is supported in Firefox/Chrome/Edge, but not in Safari/IE.
91-
>>>>>>> f830bc5d9454d85829e011d914f215eb5896579a
92-
=======
93-
94-
```smart header="Compatibility issues"
95-
Right now, `BigInt` is supported in Firefox/Chrome/Edge/Safari, but not in IE.
96-
>>>>>>> f489145731a45df6e369a3c063e52250f3f0061d
97-
```
87+
9888
9989
You can check [*MDN* BigInt compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) to know which versions of a browser are supported.
10090
@@ -140,11 +130,7 @@ Kita akan mengcover string lebih dalam di bab <info:string>.
140130
```smart header="Tidak ada tipe *character*."
141131
Dalam beberapa bahasa, ada tipe "character" spesial untuk karakter tunggal. Misalnya, di bahasa C dan di Java adalah `char`.
142132
143-
<<<<<<< HEAD
144133
Di JavaScript, tak ada tipe semacam itu. Cuma ada satu tipe: `string`. String bisa berisi satu karakter atau lebih.
145-
=======
146-
In JavaScript, there is no such type. There's only one type: `string`. A string may consist of zero characters (be empty), one character or many of them.
147-
>>>>>>> 58f6599df71b8d50417bb0a52b1ebdc995614017
148134
```
149135

150136
## Boolean (tipe logika)
@@ -272,7 +258,6 @@ Tiga baris terakhir mungkin butuh penjelasan tambahan:
272258

273259
Ada 7 tipe data dasar dalam JavaScript.
274260

275-
<<<<<<< HEAD
276261
- `number` untuk nomor dengan bentuk apapun: integer ataupun nilai yang memiliki nilai desimal, batas dari integer adalah ±2<sup>53</sup>.
277262
- `bigint` untuk nomor integer yang sangat panjang.
278263
- `string` untuk string. Sebuah string mungkin memiliki 0 atau lebih karakter, tidak ada tipe data untuk string yang memiliki panjang 1 karakter.
@@ -281,16 +266,6 @@ Ada 7 tipe data dasar dalam JavaScript.
281266
- `undefined` untuk nilai yang tidak ada atau tidak diberikan nilai -- sebuah tipe data mandiri yang memiliki satu nilai yaitu `null`.
282267
- `object` untuk struktur data yang lebih rumit.
283268
- `symbol` untuk identifier atau pengenal yang unik.
284-
=======
285-
- `number` for numbers of any kind: integer or floating-point, integers are limited by <code>±(2<sup>53</sup>-1)</code>.
286-
- `bigint` is for integer numbers of arbitrary length.
287-
- `string` for strings. A string may have zero or more characters, there's no separate single-character type.
288-
- `boolean` for `true`/`false`.
289-
- `null` for unknown values -- a standalone type that has a single value `null`.
290-
- `undefined` for unassigned values -- a standalone type that has a single value `undefined`.
291-
- `object` for more complex data structures.
292-
- `symbol` for unique identifiers.
293-
>>>>>>> ff152b126ec70a9de919bfdc1913215539d37187
294269

295270
Operator `typeof` memungkinkan kita melihat tipe mana yang disimpan dalam variable.
296271

1-js/02-first-steps/06-alert-prompt-confirm/article.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,8 @@ Ia menampilkan modal window dengan pesan teks, input field untuk pengunjung, dan
3030
`default`
3131
: Parameter kedua opsional, nilai inisial untuk input field.
3232

33-
<<<<<<< HEAD
3433
```smart header="Kurung siku didalam sintaks `[...]`"
3534
Kurung siku di sintaks `default` di kode sintaks di atas menandakan bahwa parameter itu bersifat opsional, tidak benar-benar dibutuhkan.
36-
=======
37-
```smart header="The square brackets in syntax `[...]`"
38-
The square brackets around `default` in the syntax above denote that the parameter is optional, not required.
39-
>>>>>>> ff152b126ec70a9de919bfdc1913215539d37187
4035
```
4136
4237
Pengunjung halaman bisa mengetik sesuatu didalam kotak prompt dan menekan tombol OK. Lalu kita akan mendapatkan teksnya didalam `result`. Atau pengunjung halaman bisa membatalkan kotak promp dengan menekan *Cancel* atau menekan `key:Esc` pada *keyboard*, lalu kita akan mendapatkan `null` sebagai `result`.

1-js/02-first-steps/08-operators/4-fix-prompt/solution.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@ let b = "2"; // prompt("Angka kedua?", 2);
99
alert(a + b); // 12
1010
```
1111

12-
<<<<<<< HEAD
13-
<<<<<<< HEAD
1412
Apa yang kita harus lakukan untuk mengubah string menjadi angka sebelum `+`, gunakan `Number()` atau menambahkannya dengan `+`.
15-
=======
16-
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or
17-
prepending them with `+`.
18-
>>>>>>> ff152b126ec70a9de919bfdc1913215539d37187
19-
=======
20-
What we should do is to convert strings to numbers before `+`. For example, using `Number()` or prepending them with `+`.
21-
>>>>>>> f489145731a45df6e369a3c063e52250f3f0061d
2213

2314
Contoh, tepat sebelum `prompt`:
2415

1-js/02-first-steps/08-operators/article.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,18 @@ alert( 8 % 3 ); // 2, sisa dari pembagian antara 8 dibagi 3
5656

5757
### Eksponensial **
5858

59-
<<<<<<< HEAD
6059
Operator eksponensial `a ** b` mengkalikan `a` dengan nilai itu sendiri sebanyak `b` kali.
61-
=======
62-
The exponentiation operator `a ** b` raises `a` to the power of `b`.
6360

64-
In school maths, we write that as a<sup>b</sup>.
65-
>>>>>>> 6ab384f2512902d74e4b0ff5a6be60e48ab52e96
61+
Dalam matematika sekolah, kita menuliskannya sebagai<sup>b</sup>.
6662

67-
Contoh:
68-
69-
```js run
70-
<<<<<<< HEAD
71-
<<<<<<< HEAD
72-
alert( 2 ** 2 ); // 4 (2 dikalikan dengan nilai itu sendiri sebanyak 2 kali)
73-
alert( 2 ** 3 ); // 8 (2 * 2 * 2, 3 kali)
74-
alert( 2 ** 4 ); // 16 (2 * 2 * 2 * 2, 4 kali)
75-
```
76-
77-
Secara matematis, eksponensial juga bisa digunakan untuk nomor yang bukan integer.
78-
Contoh, akar kuadrat adalah eksponen dari `1/2`:
79-
=======
80-
alert( 2 ** 2 ); // 2² = 4
81-
alert( 2 ** 3 ); // 2³ = 8
82-
=======
8363
alert( 2 ** 2 ); // 2² = 4
8464
alert( 2 ** 3 ); // 2³ = 8
85-
>>>>>>> fb4fc33a2234445808100ddc9f5e4dcec8b3d24c
8665
alert( 2 ** 4 ); // 2⁴ = 16
8766
```
8867
89-
Just like in maths, the exponentiation operator is defined for non-integer numbers as well.
68+
Sama seperti dalam matematika, operator eksponensial juga didefinisikan untuk bilangan non-bilangan bulat.
9069
91-
For example, a square root is an exponentiation by ½:
92-
>>>>>>> 6ab384f2512902d74e4b0ff5a6be60e48ab52e96
70+
Misalnya, akar kuadrat adalah eksponensial dengan :
9371
9472
```js run
9573
alert( 4 ** (1/2) ); // 2 (pangkat 1/2 sama dengan akar kuadrat)

1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,10 @@ null === +"\n0\n" → false
1212

1313
Beberapa alasan:
1414

15-
<<<<<<< HEAD
1615
1. Sudah jelas, true.
1716
2. Pembandingan kamus, jadi false. `"a"` lebih kecil dari `"p"`.
1817
3. Lagi, pembandingan kamus, karakter pertama `"2"` lebih besar dari karakter pertama `"1"`.
1918
4. Nilai `null` dan `undefined` selalu bernilai sama.
2019
5. Equalitas ketat memang ketat. Tipe berbeda dari kedua sisi menghasilkan false.
2120
6. Serupa dengan `(4)`, `null` hanya sama dengan `undefined`.
2221
7. Equalitas ketat dari tipe berbeda.
23-
=======
24-
1. Obviously, true.
25-
2. Dictionary comparison, hence false. `"a"` is smaller than `"p"`.
26-
3. Again, dictionary comparison, first char `"2"` is greater than the first char `"1"`.
27-
4. Values `null` and `undefined` equal each other only.
28-
5. Strict equality is strict. Different types from both sides lead to false.
29-
6. Similar to `(4)`, `null` only equals `undefined`.
30-
7. Strict equality of different types.
31-
>>>>>>> f489145731a45df6e369a3c063e52250f3f0061d

1-js/02-first-steps/09-comparison/article.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,7 @@ algoritma untuk membandingkan dua string sederhana:
5757
4. Ulangi sampai string berakhir.
5858
5. Jika kedua string berakhir pada panjang yang sama, maka mereka sama. Sebaliknya, string lebih panjang yang lebih besar.
5959

60-
<<<<<<< HEAD
6160
Pada contoh di atas, pembandingan `'Z' > 'A'` menghasilkan pada langkah pertama sedangkan string `"Glow"` dan `"Glee"` dibandingkan karakter-demi-karakter:
62-
=======
63-
In the first example above, the comparison `'Z' > 'A'` gets to a result at the first step.
64-
65-
The second comparison `'Glow'` and `'Glee'` needs more steps as strings are compared character-by-character:
66-
>>>>>>> d6e88647b42992f204f57401160ebae92b358c0d
6761

6862
1. `G` sama dengan `G`.
6963
2. `l` sama dengan `l`.

0 commit comments

Comments
 (0)