If Statement. IF Statements Executing code when one thing happens rather than something else is so common in programming that that the IF Statement has.