Skip to content

Commit 9c88574

Browse files
authored
Merge pull request lydiahallie#3 from thegdads/indonesia-translations-patch-1
Translate question number 1
2 parents d172aa6 + 017c547 commit 9c88574

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

id-ID/README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
<div align="center">
2-
<img height="60" src="https://img.icons8.com/color/344/javascript.png">
3-
<h1>Pertanyaan JavaScript</h1>
1+
<h1>Pertannyaan JavaScript</h1>
42

5-
---
3+
---
64

7-
<span>Saya menerbitkan beberapa pilihan pertanyaan Javascript di akun Instagram Story [Instagram](https://www.instagram.com/theavocoder), yang mana diterbitkan disini juga! Terakhir diperbaharui: <a href=#20191224><b>24 Desember</b></a>
5+
<span>Saya post pertanyaan pilihan ganda ke [Instagram](https://www.instagram.com/theavocoder) **stories** saya, yang saya post juga di sini ! update terakhir: <a href=#20191224><b>December 24th</b></a>
86

9-
From basic to advanced: test how well you know JavaScript, refresh your knowledge a bit, or prepare for your coding interview! :muscle: :rocket: I update this repo regularly with new questions. I added the answers in the **collapsed sections** below the questions, simply click on them to expand it. It's just for fun, good luck! :heart:</span>
10-
Dari tingkat dasar sampai tingkat lanjut: Menguji seberapa jago Anda di JavaScript, asah pengetahuan Anda, atau untuk persiapan interview tentang pemrograman! :muscle: :rocket: Saya akan memperbaharui jawaban di bagian yang tertutup di bawah pertanyaan, sederhananya tinggal di klik saja yang nantinya jawaban akan muncul disana. Ini hanya untuk bersenang - senang saja, semoga berhasil! :heart:</span>
7+
Mulai tingkat dasar ke mahir: tes seberapa paham kamu tentang javascript, segarkan sedikit pengetahuan kamu, atau bersiap-siap untuk coding interview kamu! :muscle: :rocket: Saya update repo ini secara berkala dengan pertanyaan baru. Saya masukkan jawaban dibagian yang **tersembunyi** di bawah pertanyaan, cukup klik pada bagian itu untuk menampilkannya. Pertanyaan ini hanya untuk bersenang-senang, Semoga berhasil :heart:</span>
118

12-
Feel free to reach out to me! 😊 <br />
139
Jangan sungkan untuk terhubung dengan saya! 😊 <br />
1410
<a href="https://www.instagram.com/theavocoder">Instagram</a> || <a href="https://www.twitter.com/lydiahallie">Twitter</a> || <a href="https:/www.linkedin.com/in/lydia-hallie">LinkedIn</a> || <a href="www.lydiahallie.dev">Blog</a>
1511

@@ -56,20 +52,19 @@ function sayHi() {
5652
sayHi();
5753
```
5854

59-
- A: `Lydia` and `undefined`
60-
- B: `Lydia` and `ReferenceError`
61-
- C: `ReferenceError` and `21`
62-
- D: `undefined` and `ReferenceError`
55+
- A: `Lydia` dan `undefined`
56+
- B: `Lydia` dan `ReferenceError`
57+
- C: `ReferenceError` dan `21`
58+
- D: `undefined` dan `ReferenceError`
6359

6460
<details><summary><b>Jawaban</b></summary>
6561
<p>
6662

6763
#### Jawaban: D
6864

69-
Within the function, we first declare the `name` variable with the `var` keyword. This means that the variable gets hoisted (memory space is set up during the creation phase) with the default value of `undefined`, until we actually get to the line where we define the variable. We haven't defined the variable yet on the line where we try to log the `name` variable, so it still holds the value of `undefined`.
70-
71-
Variables with the `let` keyword (and `const`) are hoisted, but unlike `var`, don't get <i>initialized</i>. They are not accessible before the line we declare (initialize) them. This is called the "temporal dead zone". When we try to access the variables before they are declared, JavaScript throws a `ReferenceError`.
65+
Di dalam function, kita buat variabel `name` dan variabel declaration-nya menggunakan `var`. Artinya variable tersebut hoisted (dalam fase pembuatan ini menggunakan memory penyimpanan) dengan isi standar-nya `undefined`, hingga kita benar berada di baris code pembuatan variabel-nya. Kita belum membuat variabel tersebut saat kita memanggil variabel `name`, jadi isi dari varabel tersebut masih `undefined`
7266

67+
Variabel declaration yang menggunakan `let` (dan `const`) juga hoisted, tapi tidak seperti `var`, variabel declaration `let` dan `const` tidak ditentukan isi standar-nya. `let` dan `const` tidak bisa diakses sebelum di tentukan dulu isi-nya. Kejadian ini disebut "temporal dead zone". Saat kita mencoba memanggil variabel yang belum ditentukan isi-nya, Javascript mengeluarkan error `ReferenceError`.
7368
</p>
7469
</details>
7570

0 commit comments

Comments
 (0)