Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit 0e69687

Browse files
committed
finished conditiınals
1 parent 5198f7d commit 0e69687

File tree

1 file changed

+40
-0
lines changed
  • Temeller _2.0/conditionals

1 file changed

+40
-0
lines changed

Temeller _2.0/conditionals/app.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Karşılaştırma Operatörleri
2+
3+
// === değerler ve tipler aynı mı ?
4+
// bu daha kullanışlı
5+
6+
console.log(2 === "2"); // false
7+
8+
// Mantıksal Bağlaçlar
9+
10+
// Not
11+
console.log(!(2 === 2)); // false
12+
13+
// And -> &&
14+
// Or -> ||
15+
16+
const error = true;
17+
18+
if(error === true){
19+
console.log("Hata oluştu");
20+
}
21+
else if(error == null){
22+
console.log("Bilinmiyor...");
23+
}
24+
else{
25+
console.log("Hatasız çalıştı");
26+
}
27+
28+
29+
const number =120;
30+
if (number == 100){
31+
console.log("Sayı 100'e eşit");
32+
}
33+
else{
34+
console.log("Sayı 100'e eşit değil");
35+
}
36+
// OR
37+
38+
// Ternary Operator
39+
40+
console.log(number === 100 ? "Sayı 100." : "Sayı 100 değil.")

0 commit comments

Comments
 (0)