Conditional statements
When you write code, you often want to perform different actions for different decisions. You can use conditional statements in your code to do this. In JavaScript, we have three conditional statements: if, if...else, and switch.
Free Content Making decisions in your code — conditionals Conditional branching: if, '?'