If , elsif, else, end. ruby
simple way to learn or remember the if statements in ruby.
IF STATEMENT. If the statement you put in is true it will run the code you want your program to run. If the verification of the statement is false it won’t run the following code associated with the if statement.
ELSIF STATEMENT. After checking the IF statement and it comes out false then the elsif will come into play checking elsif is true. If elsif is true same goes to the code it will run the program associated with the elsif statement.
ELSE STATEMENT. most likely your else statement will be empty right after else because this will be the last one you would like to run after checking your if and elsif. It will simply run whatever you put in the else statement if your if and elsif are both false.
You can put any number of if and elsif until it is done checking all the statements you put in. It will END the code.
Hope this will help you remember and learn in a simpler way.