Skip to content

Commit c2672c0

Browse files
authored
"Yorumlar" bölümü Türkçe'ye çevrildi.
1 parent 6cd08cb commit c2672c0

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,44 +2010,48 @@ review.perfReview();
20102010

20112011
**[⬆ en başa dön](#içindekiler)**
20122012

2013-
## **Comments**
2014-
### Only comment things that have business logic complexity.
2015-
Comments are an apology, not a requirement. Good code *mostly* documents itself.
2013+
## **Yorumlar**
2014+
### Sadece iş mantığının karmaşık olduğu durumlarda yorumları kullanın.
2015+
Yorumlar lükstür, zorunlu değildir. İyi kod *çoğunlukla* kendini belli eder.
20162016

20172017
**Kötü:**
20182018
```javascript
2019-
function hashIt(data) {
2020-
// The hash
2021-
let hash = 0;
2019+
function ozetCikar(veri) {
2020+
// Özet
2021+
let ozet = 0;
20222022

2023-
// Length of string
2024-
const length = data.length;
2023+
// data değişkeninin uzunluğu
2024+
const uzunluk = veri.length;
20252025

2026-
// Loop through every character in data
2027-
for (let i = 0; i < length; i++) {
2028-
// Get character code.
2029-
const char = data.charCodeAt(i);
2030-
// Make the hash
2031-
hash = ((hash << 5) - hash) + char;
2032-
// Convert to 32-bit integer
2033-
hash &= hash;
2026+
// veri değişkeninin her karakterini döngüye sok
2027+
for (let i = 0; i < uzunluk; i++) {
2028+
2029+
// Karakter kodunu getir
2030+
const karakter = veri.charCodeAt(i);
2031+
2032+
// Özetini çıkar
2033+
ozet = ((ozet << 5) - ozet) + karakter;
2034+
2035+
// 32-bit'lik sayıya çevir
2036+
ozet &= ozet;
2037+
20342038
}
20352039
}
20362040
```
20372041

20382042
**İyi:**
20392043
```javascript
20402044

2041-
function hashIt(data) {
2042-
let hash = 0;
2043-
const length = data.length;
2045+
function ozetCikar(veri) {
2046+
let ozet = 0;
2047+
const uzunluk = veri.length;
20442048

2045-
for (let i = 0; i < length; i++) {
2046-
const char = data.charCodeAt(i);
2047-
hash = ((hash << 5) - hash) + char;
2049+
for (let i = 0; i < uzunluk; i++) {
2050+
const karakter = veri.charCodeAt(i);
2051+
ozet = ((ozet << 5) - ozet) + karakter;
20482052

2049-
// Convert to 32-bit integer
2050-
hash &= hash;
2053+
// 32-bit'lik sayıya çevir
2054+
ozet &= ozet;
20512055
}
20522056
}
20532057

0 commit comments

Comments
 (0)