If Else Yapıları
1. If-Else Yapısının Temel Kullanımı
if (condition) {
// Koşul doğruysa çalışacak kod bloğu
} else {
// Koşul yanlışsa çalışacak kod bloğu
}function checkValue(uint256 _value) public pure returns (string memory) {
if (_value > 10) {
return "Value is greater than 10";
} else {
return "Value is 10 or less";
}
}2. Else If Yapısı
3. Nested If-Else Yapıları
Örnek Uygulama
Last updated