Kaydet (Commit) 9e46ecf7 authored tarafından Ali GOREN's avatar Ali GOREN

Fonksiyon isimleri ne yapmalı?

üst 0087be76
...@@ -261,28 +261,28 @@ function isActiveClient(client) { ...@@ -261,28 +261,28 @@ function isActiveClient(client) {
``` ```
**[⬆ en başa dön](#içindekiler)** **[⬆ en başa dön](#içindekiler)**
### Function names should say what they do ### Fonksiyon İsimleri Ne Yaptıklarını Söylemeli
**Kötü:** **Kötü:**
```javascript ```javascript
function addToDate(date, month) { function tariheEkle(tarih, ay) {
// ... // ...
} }
const date = new Date(); const date = new Date();
// It's hard to tell from the function name what is added // Fonksiyonun adına bakarak neyin nereye eklendiğini söylemek zor
addToDate(date, 1); tariheEkle(tarih, 1);
``` ```
**İyi:** **İyi:**
```javascript ```javascript
function addMonthToDate(month, date) { function tariheAyEkle(ay, tarih) {
// ... // ...
} }
const date = new Date(); const date = new Date();
addMonthToDate(1, date); tariheAyEkle(1, tarih);
``` ```
**[⬆ en başa dön](#içindekiler)** **[⬆ en başa dön](#içindekiler)**
......
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