• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Controlling Information Flow > Providing Alternatives to Conditions

Providing Alternatives to Conditions

In many cases, you’ll need to provide an alternative response to the conditional statement. The else statement lets you create consequences when the condition in the if statement is false. The else statement takes care of any condition that the if statement doesn’t cover.

The else statement has to be used in conjunction with the if statement and follows the syntax and logic of this hypothetical example:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint