ElseIf

If, Else and Else If Statements

Introduction: Hello. In this tutorial you will learn about the if, else and else if statements. When are these statements used? The if statement is used to check if certain conditions are true. For example, just like we would say in English, if the time of day is noon we should eat lunch, else we shouldn't. So, what is else if? Since the if statement is used to check if certain conditions are true and else is for the opposite, what else do we need? To be able to check multiple times if certain conditions are true, but not the same.