Nested if...else Statement
var number = 5
// outer if statement
if (number >= 0) {
// inner if statement
if (number == 0) {
print("Number is 0")
}
// inner else statement
else {
print("Number is positive");
}
}
// outer else statement
else {
print("Number is negative");
}
nested if statement
if (condition) {
if (anotherCondition) {
// executes if both condition and anotherCondition are true
} else {
// executes if condition is true and anotherCondition is false
}
} else {
// executes if condition is false
}