A. KULLANIM

1. Sayısal manipülasyonlar

Doğru Örnek:

const num1 = 3;
const num2 = 3 + 1;

Yanlış Örnek:

let num1 = 3;
// BAD: don't use increment operator
num1++;

2. String manipülasyonları

Doğru Örnek:

const str1 = "Eser";
const str2 = `${str1} Ozvataf`;

Yanlış Örnek:

const str1 = "Eser";
// BAD: don't use concatenation on strings
const str2 = str1 + " Ozvataf";

3. Array manipülasyonları

Doğru Örnek:

const arr1 = [ "a" ];
const arr2 = [ ...arr1, "b" ];

Yanlış Örnek:

// BAD: don't use array constructor
const arr1 = new Array("a");
// BAD: instead of adding new items to existing array, create a new one
arr1.push("b");

4. Nesne manipülasyonları

Doğru Örnek:

const obj1 = { a: 1 };
const obj2 = { ...obj1, b: 2 };

Yanlış Örnek: