Introduction
An if statement helps your program make decisions by running code only when certain conditions are true.
To check if a user is logged in before showing their profile.
To decide if a number is positive or negative and show a message.
To turn on a light only if it is dark outside.
To give a discount only if a customer buys more than 5 items.