If statements are a fundamental part of most development languages. Though the syntax varies from one language to the next, the basic concepts and options are the same. If statements are used to create conditions that are evaluated, enabling you to perform actions based on the result.
The conditions passed to if statements always evaluate to TRUE or FALSE, and any condition that can be expressed as a TRUE / FALSE (or YES / NO) question is valid. Here are some examples of valid conditions:
Is today Monday?
Does variable FirstName exist?
Were any rows retrieved from a database?
Does variable one equal variable two?
Is a specific word in a sentence?
More complex conditions (multiple conditions) are allowed, too:
Is today Sunday or Saturday? ...