Chapter 6
Example 6.1: The 'if' Statement
Example 6.2: Using = Instead of ==
Example 6.3: If Statements with Boolean Variables
Example 6.4: Using "else"
Example 6.5: An if Statement Without Brackets
Example 6.6: Using "Not Equal To" (!=)
Example 6.7: The "Greater Than" Operator (>)
Example 6.8: Greater Than or Equal To (>=)
Example 6.9: Nesting if Statements
Example 6.10: Boolean Operators
Example 6.11: Boolean "Not"
Example 6.12: The "?" Operator--a Shorthand 'if' Statement
Example 6.13: A 'for' Loop
Example 6.14: Mimicking a 'for' Loop with Nested if Statements
Example 6.15: A 'while' Loop
Example 6.16: A 'while' Loop Without a Counter
Example 6.17: Duplicating a do while Loop
Example 6.18: Breaking Out of Loops--break
Example 6.19: Returning to the Top of The Loop—continue