Unverified Kaydet (Commit) c2672c05 authored tarafından omer citak's avatar omer citak Kaydeden (comit) GitHub

"Yorumlar" bölümü Türkçe'ye çevrildi.

üst 6cd08cb2
...@@ -2010,27 +2010,31 @@ review.perfReview(); ...@@ -2010,27 +2010,31 @@ review.perfReview();
**[⬆ en başa dön](#içindekiler)** **[⬆ en başa dön](#içindekiler)**
## **Comments** ## **Yorumlar**
### Only comment things that have business logic complexity. ### Sadece iş mantığının karmaşık olduğu durumlarda yorumları kullanın.
Comments are an apology, not a requirement. Good code *mostly* documents itself. Yorumlar lükstür, zorunlu değildir. İyi kod *çoğunlukla* kendini belli eder.
**Kötü:** **Kötü:**
```javascript ```javascript
function hashIt(data) { function ozetCikar(veri) {
// The hash // Özet
let hash = 0; let ozet = 0;
// Length of string // data değişkeninin uzunluğu
const length = data.length; const uzunluk = veri.length;
// Loop through every character in data // veri değişkeninin her karakterini döngüye sok
for (let i = 0; i < length; i++) { for (let i = 0; i < uzunluk; i++) {
// Get character code.
const char = data.charCodeAt(i); // Karakter kodunu getir
// Make the hash const karakter = veri.charCodeAt(i);
hash = ((hash << 5) - hash) + char;
// Convert to 32-bit integer // Özetini çıkar
hash &= hash; ozet = ((ozet << 5) - ozet) + karakter;
// 32-bit'lik sayıya çevir
ozet &= ozet;
} }
} }
``` ```
...@@ -2038,16 +2042,16 @@ function hashIt(data) { ...@@ -2038,16 +2042,16 @@ function hashIt(data) {
**İyi:** **İyi:**
```javascript ```javascript
function hashIt(data) { function ozetCikar(veri) {
let hash = 0; let ozet = 0;
const length = data.length; const uzunluk = veri.length;
for (let i = 0; i < length; i++) { for (let i = 0; i < uzunluk; i++) {
const char = data.charCodeAt(i); const karakter = veri.charCodeAt(i);
hash = ((hash << 5) - hash) + char; ozet = ((ozet << 5) - ozet) + karakter;
// Convert to 32-bit integer // 32-bit'lik sayıya çevir
hash &= hash; ozet &= ozet;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment