You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: id-ID/README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -428,7 +428,7 @@ Kita tahu bahwa `this.firstName` setara dengan `"Sarah"` dan `this.lastName` sam
428
428
429
429
---
430
430
431
-
###### 13. What are the three phases of event propagation?
431
+
###### 13. Apa tiga fase dari event propagation?
432
432
433
433
- A: Target > Capturing > Bubbling
434
434
- B: Bubbling > Target > Capturing
@@ -440,7 +440,7 @@ Kita tahu bahwa `this.firstName` setara dengan `"Sarah"` dan `this.lastName` sam
440
440
441
441
#### Jawaban: D
442
442
443
-
During the**capturing** phase, the event goes through the ancestor elements down to the target element. It then reaches the **target** element, and**bubbling**begins.
443
+
Selama fase**capturing**, event melewati elemen ancestor hingga ke elemen target. Kemudian mencapai element **target**, dan**bubbling**dimulai.
@@ -459,7 +459,7 @@ During the **capturing** phase, the event goes through the ancestor elements dow
459
459
460
460
#### Jawaban: B
461
461
462
-
All objects have prototypes, except for the **base object**. The base object is the object created by the user, or an object that is created using the `new` keyword. The base object has access to some methods and properties, such as `.toString`. This is the reason why you can use built-in JavaScript methods! All of such methods are available on the prototype. Although JavaScript can't find it directly on your object, it goes down the prototype chain and finds it there, which makes it accessible for you.
462
+
Semua objek memiliki prototypes, kecuali **objek dasar**. Objek dasar adalah objek yang dibuat oleh pengguna, atau objek yang dibuat dengan menggunakan kata kunci `baru`. Objek dasar memiliki akses ke beberapa metode dan properti, seperti `.toString`. Inilah alasan mengapa Anda dapat menggunakan metode JavaScript bawaan! Semua metode tersebut tersedia di prototipe. Meskipun JavaScript tidak dapat menemukannya secara langsung di objek Anda, JavaScript berada di rantai prototipe dan menemukannya di sana, yang membuatnya dapat diakses untuk Anda.
463
463
464
464
</p>
465
465
</details>
@@ -514,17 +514,17 @@ console.log(number);
514
514
515
515
#### Jawaban: C
516
516
517
-
The **postfix**unary operator `++`:
517
+
**Akhiran** operator unary`++`:
518
518
519
-
1.Returns the value (this returns`0`)
520
-
2.Increments the value (number is now`1`)
519
+
1.Mengembalikan nilai (ini mengembalikan`0`)
520
+
2.Menambahkan nilai (angkanya sekarang`1`)
521
521
522
-
The **prefix**unary operator `++`:
522
+
**Awalan** operator unary`++`:
523
523
524
-
1.Increments the value (number is now`2`)
525
-
2.Returns the value (this returns`2`)
524
+
1.Menambah nilai (angkanya sekarang`2`)
525
+
2.Mengembalikan nilai (ini mengembalikan`2`)
526
526
527
-
This returns`0 2 2`.
527
+
Ini mengembalikan`0 2 2`.
528
528
529
529
</p>
530
530
</details>
@@ -555,7 +555,7 @@ getPersonInfo`${person} is ${age} years old`;
555
555
556
556
#### Jawaban: B
557
557
558
-
If you use tagged template literals, the value of the first argument is always an array of the string values. The remaining arguments get the values of the passed expressions!
558
+
Jika Anda menggunakan literal template yang diberi tag, nilai argumen pertama selalu berupa array bernilai string. Argumen yang tersisa mendapatkan nilai dari ekspresi yang diteruskan!
559
559
560
560
</p>
561
561
</details>
@@ -587,11 +587,11 @@ checkAge({ age: 18 });
587
587
588
588
#### Jawaban: C
589
589
590
-
When testing equality, primitives are compared by their _value_, while objects are compared by their _reference_. JavaScript checks if the objects have a reference to the same location in memory.
590
+
Saat menguji persamaan, primitif dibandingkan dengan nilainya, sedangkan objek dibandingkan dengan referensinya. JavaScript memeriksa apakah objek memiliki referensi ke lokasi yang sama di memori.
591
591
592
-
The two objects that we are comparing don't have that: the object we passed as a parameter refers to a different location in memory than the object we used in order to check equality.
592
+
Dua objek yang kita bandingkan tidak memiliki itu: objek yang kita lewati sebagai parameter merujuk ke lokasi yang berbeda dalam memori dari objek yang kita gunakan untuk memeriksa persamaan.
593
593
594
-
This is why both `{ age: 18} === {age: 18}`and`{age: 18} == {age: 18}`return`false`.
The rest parameter (`...args`.) lets us "collect" all remaining arguments into an array. An array is an object, so`typeof args`returns `"object"`
621
+
Parameter sisanya (`...args`.) Memungkinkan kita "mengumpulkan" semua argumen yang tersisa ke dalam sebuah array. Array adalah sebuah objek, jadi`typeof args`mengembalikan "objek"
622
622
623
623
</p>
624
624
</details>
@@ -647,7 +647,7 @@ getAge();
647
647
648
648
#### Jawaban: C
649
649
650
-
With`"use strict"`, you can make sure that you don't accidentally declare global variables. We never declared the variable`age`, and since we use`"use strict"`, it will throw a reference error. If we didn't use`"use strict"`, it would have worked, since the property `age`would have gotten added to the global object.
650
+
Dengan`"use strict"`, Anda dapat memastikan bahwa Anda tidak mendeklarasikan variabel global secara tidak sengaja. Kita tidak pernah mendeklarasikan variabel`age`, dan karena kita menggunakan`"use strict"`, ini akan memunculkan kesalahan referensi. Jika kita tidak menggunakan`"use strict"`, ini akan berhasil, karena properti `age`akan ditambahkan ke objek global.
0 commit comments