Skip to content

Commit d148c65

Browse files
committed
well done, translated to Bahasa Indonesia
1 parent 23ff3fa commit d148c65

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

README.md

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,19 +1987,21 @@ getdata()
19871987

19881988

19891989
## **Menyusun Format**
1990-
Formatting is subjective. Like many rules herein, there is no hard and fast
1991-
rule that you must follow. The main point is DO NOT ARGUE over formatting.
1992-
There are [tons of tools](http://standardjs.com/rules.html) to automate this.
1993-
Use one! It's a waste of time and money for engineers to argue over formatting.
1990+
Menyusun format adalah subjektif. Seperti aturan disini, tidak ada aturan keras
1991+
yang harus kamu ikuti. Poin utamanya adalah JANGAN BERDEBAT atas format. Ada
1992+
[banyak sekali alat](http://standardjs.com/rules.html) untuk mengotomasi hal ini.
1993+
Gunakan salah satu! Hal ini adalah pemborosan waktu dan uang engineers untuk
1994+
berdebat soal format.
19941995

1995-
For things that don't fall under the purview of automatic formatting
1996-
(indentation, tabs vs. spaces, double vs. single quotes, etc.) look here
1997-
for some guidance.
1996+
Untuk hal-hal yang tidak termasuk dalam hal format otomatis (indentasi,
1997+
tabulasi vs. spasi, ganda vs tanda petik tunggal, dll) lihatlah kesini
1998+
untuk beberapa bimbingan.
19981999

19992000
### Gunakan Kapitalisasi yg konsisten
2000-
JavaScript is untyped, so capitalization tells you a lot about your variables,
2001-
functions, etc. These rules are subjective, so your team can choose whatever
2002-
they want. The point is, no matter what you all choose, just be consistent.
2001+
JavaScript tidak memiliki penggolongan, jadi kapitalisasi memberitahumu banyak
2002+
tentang variabel, fungsi, dll. Aturan ini adalah subjektif, jadi tim-mu dapat
2003+
memilih apapun yang mereka inginkan. Poinnya adalah, tidak masalah apa yang
2004+
kalian semua pilih, cukup tetaplah konsisten.
20032005

20042006
**Buruk:**
20052007
```javascript
@@ -2034,9 +2036,10 @@ class Alpaca {}
20342036

20352037

20362038
### Fungsi yg memanggil dan yang dipanggil seharusnya berdekatan
2037-
If a function calls another, keep those functions vertically close in the source
2038-
file. Ideally, keep the caller right above the callee. We tend to read code from
2039-
top-to-bottom, like a newspaper. Because of this, make your code read that way.
2039+
Jika sebuah fungsi memanggil yang lainnya, jagalah fungsi tersebut secara vertikal
2040+
berdekatan dengan sumber. Secara ideal, jaga yang memanggil tepat dibawah yang
2041+
dipanggil. Kita cenderung membaca kode dari atas-ke-bawah, seperti koran. Karenanya,
2042+
buat kodemu terbaca seperti itu.
20402043

20412044
**Buruk:**
20422045
```javascript
@@ -2120,24 +2123,25 @@ review.perfReview();
21202123

21212124
## **Komentar**
21222125
### Komentar hanya untuk hal-hal yang memiliki kompleksitas logika.
2123-
Comments are an apology, not a requirement. Good code *mostly* documents itself.
2126+
Komentar adalah sebuah permintaan maaf, bukan sebuah syarat. Kode yang baik
2127+
*kebanyakan* bisa mendokumentasikan dirinya sendiri.
21242128

21252129
**Buruk:**
21262130
```javascript
21272131
function hashIt(data) {
2128-
// The hash
2132+
// ini hash
21292133
let hash = 0;
21302134

2131-
// Length of string
2135+
// panjang dari sebuah string
21322136
const length = data.length;
21332137

2134-
// Loop through every character in data
2138+
// Loop setiap karakter dalam sebuah data
21352139
for (let i = 0; i < length; i++) {
2136-
// Get character code.
2140+
// mendapatkan karakter di kode
21372141
const char = data.charCodeAt(i);
2138-
// Make the hash
2142+
// Membuah hash
21392143
hash = ((hash << 5) - hash) + char;
2140-
// Convert to 32-bit integer
2144+
// mengonversi ke 32-bit integer
21412145
hash &= hash;
21422146
}
21432147
}
@@ -2154,7 +2158,7 @@ function hashIt(data) {
21542158
const char = data.charCodeAt(i);
21552159
hash = ((hash << 5) - hash) + char;
21562160

2157-
// Convert to 32-bit integer
2161+
// Mengonversi ke 32-bit integer
21582162
hash &= hash;
21592163
}
21602164
}
@@ -2163,7 +2167,7 @@ function hashIt(data) {
21632167
**[⬆ Kembali ke atas](#daftar-isi)**
21642168

21652169
### Jangan meninggalkan kode yang dikomentari dalam basis kode anda
2166-
Version control exists for a reason. Leave old code in your history.
2170+
`Version control` ada karena sebuah alasan. Tinggalkan kode lamamu di riwayat.
21672171

21682172
**Buruk:**
21692173
```javascript
@@ -2180,8 +2184,9 @@ doStuff();
21802184
**[⬆ Kembali ke atas](#daftar-isi)**
21812185

21822186
### Jangan ada komentar tentang jurnal
2183-
Remember, use version control! There's no need for dead code, commented code,
2184-
and especially journal comments. Use `git log` to get history!
2187+
Ingat, gunakan version control! Tidak perlu kode mati, kode yang dikomentari,
2188+
dan khususnya komentar tentang jurnal. Gunakan `git log` untuk mendapatkan
2189+
riwayat!
21852190

21862191
**Buruk:**
21872192
```javascript
@@ -2205,8 +2210,9 @@ function combine(a, b) {
22052210
**[⬆ Kembali ke atas](#daftar-isi)**
22062211

22072212
### Hindari komentar marker
2208-
They usually just add noise. Let the functions and variable names along with the
2209-
proper indentation and formatting give the visual structure to your code.
2213+
Mereka biasanya hanya menambahkan kebisingan. Biarkan nama fungsi dan variabel
2214+
bersama dengan indentasi yang layak dan susunan format memberikan struktur visual
2215+
ke kode-mu.
22102216

22112217
**Buruk:**
22122218
```javascript

0 commit comments

Comments
 (0)