The Nested if Statement
You can have if statements inside if statements, this is called a nested if.
Syntax
if
condition1 {
// code to be executed if condition1 is true
if
condition2 {
// code to be executed if both condition1 and condition2 are true
}
}if