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
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -670,7 +670,7 @@ const sum = eval('10*10+5');
670
670
671
671
#### Jawaban: A
672
672
673
-
`eval`evaluates codes that's passed as a string. If it's an expression, like in this case, it evaluates the expression. The expression is `10 * 10 + 5`. This returns the number`105`.
673
+
`eval`mengevaluasi kode yang berlalu sebagai string. Jika itu adalah ekspresi, seperti dalam kasus ini, itu mengevaluasi ekspresi. Ungkapannya adalah `10 * 10 + 5`. Ini kembali nomor`105`.
674
674
675
675
</p>
676
676
</details>
@@ -721,9 +721,9 @@ console.log(num);
721
721
722
722
#### Jawaban: B
723
723
724
-
With the `var` keyword, you can declare multiple variables with the same name. The variable will then hold the latest value.
724
+
Dengan kata kunci `var`, anda dapat menyatakan beberapa variabel dengan nama yang sama. Variabelnya akan memegang nilai terakhir.
725
725
726
-
You cannot do this with `let`or`const`since they're block-scoped.
726
+
Anda tidak dapat melakukan ini dengan `let`atau`const`karena mereka block-scoped.
727
727
728
728
</p>
729
729
</details>
@@ -778,7 +778,7 @@ console.log(obj);
778
778
779
779
#### Jawaban: C
780
780
781
-
If you have two keys with the same name, the key will be replaced. It will still be in its first position, but with the last specified value.
781
+
Jika anda memiliki dua kunci dengan nama yang sama, kunci akan diganti. Ini masih dalam posisi pertama, tetapi dengan nilai terakhir yang ditentukan.
782
782
783
783
</p>
784
784
</details>
@@ -851,7 +851,7 @@ name.giveLydiaPizza();
851
851
852
852
#### Jawaban: A
853
853
854
-
`String`is a built-in constructor, which we can add properties to. I just added a method to its prototype. Primitive strings are automatically converted into a string object, generated by the string prototype function. So, all strings (string objects) have access to that method!
854
+
`String`adalah konstruksi dibangun, yang dapat kita tambahkan properti ke. Aku hanya menambahkan metode ke prototipe. String primitif string secara otomatis dikonversi menjadi objek string, dihasilkan oleh fungsi prototipe string. Jadi, semua string (objek string) memiliki akses ke metode itu!
855
855
856
856
</p>
857
857
</details>
@@ -914,31 +914,31 @@ baz();
914
914
915
915
#### Jawaban: B
916
916
917
-
We have a`setTimeout`function and invoked it first. Yet, it was logged last.
917
+
Kami memiliki fungsi`setTimeout`dan dimohonkan terlebih dahulu. Namun, itu login terakhir.
918
918
919
-
This is because in browsers, we don't just have the runtime engine, we also have something called a`WebAPI`. The `WebAPI`gives us the`setTimeout` function to start with, and for example the DOM.
919
+
Hal ini karena di browsers, kita tidak hanya memiliki mesin waktu runtime, kita juga memiliki sesuatu yang disebut`WebAPI`. `WebAPI`memberi kita fungsi`setTimeout`, dan misalnya DOM.
920
920
921
-
After the _callback_is pushed to the WebAPI, the`setTimeout`function itself (but not the callback!) is popped off the stack.
921
+
Setelah _callback_(panggilan balik) didorong ke WebAPI, fungsi`setTimeout`itu sendiri (tetapi tidak panggilan balik) muncul dari tumpukan.
The WebAPI can't just add stuff to the stack whenever it's ready. Instead, it pushes the callback function to something called the_queue_.
933
+
WebAPI tidak bisa hanya menambahkan barang-barang ke tumpukan setiap kali siap. Sebaliknya, ia mendorong fungsi panggilan balik ke sesuatu yang disebut_queue_ (antrian).
This is where an event loop starts to work. An**event loop**looks at the stack and task queue. If the stack is empty, it takes the first thing on the queue and pushes it onto the stack.
937
+
Di sinilah serangkaian acara mulai bekerja. Sebuah**event loop**(putaran kejadian/peristiwa) melihat tumpukan dan antrian tugas. Jika tumpukan kosong, itu mengambil hal pertama pada antrian dan mendorong ke tumpukan.
0 commit comments