Conditional
Also known as if statement · branching
Code that chooses what to do based on whether a condition is true.
In the real world
If the cart is empty, hide the checkout button.
Also known as if statement · branching
Code that chooses what to do based on whether a condition is true.
If the cart is empty, hide the checkout button.