Now that you know how to write conditional clauses and even how to combine multiple clauses, it's time to write if statements. if statements enable you to execute some code, either a single line of code or a block of code if the conditional evaluates to true. You can optionally execute a line of code or even a block of code if the expression is false. To write an if-else statement:
Tip
|