If Expressions
An if expression evaluates it’s conditional expression.
If it’s true, evaluates it’s then block
If it’s false, evaluates it’s else block
An if expression -unlike the if statement- MUST have both a then and an else blocks.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
An if expression evaluates it’s conditional expression.
If it’s true, evaluates it’s then block
If it’s false, evaluates it’s else block
An if expression -unlike the if statement- MUST have both a then and an else blocks.