Conditions
Choose behavior with if, else, and switch.
What you’ll learn
Conditional statements run code only when an expression is truthy. Keep each branch focused and easy to understand.
Press Ctrl/Cmd + Enter to run.
Choose behavior with if, else, and switch.
Conditional statements run code only when an expression is truthy. Keep each branch focused and easy to understand.
Press Ctrl/Cmd + Enter to run.