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

Using If...Then...Else

The first branching statement that you should know about is the If statement. As you might guess from the word, the If statement executes code if something is true.

The Simple If Statement

To begin with, you can use If to control the execution of one or more statements. Here’s an example:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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