+ 5
If statements
Can if statements be chained inside each other?
3 Antworten
+ 13
They can be chained together, and nested inside each other, however you need for your program.
//Chaining
if () {}
else if () {}
...
else {}
//Nesting
if ()
{
if ()
{
if () {}
}
else if() {}
else {}
}
+ 3
yep and they can be nested as deep as you wish