Else If Expressions
There's a third option we can add beside
if
and else
. It's called else if
. Using
else if
creates a new if
statement that
only runs if the thing before it was false.
There's a third option we can add beside
if
and else
. It's called else if
. Using
else if
creates a new if
statement that
only runs if the thing before it was false.