Game Development Reference
In-Depth Information
In the previous screenshot, you can see the structure of an
else if
statement. As you
can see, we start by saying
else
to the original
if
statement, and then follow with an-
other
if
statement to check. In this case, the
if
statement following the
else
would be
true as four is greater than two. Because the
else if
statement is true, the code inside
the curly braces that follow would be executed.