Conditional (If) Statements

Single Condition

if condition1

  # code to execute if condition1 is true

else

  # code to execute if condition1 is false

end

Multiple Conditions:

if condition1

  # code to execute if condition1 is true

elseif condition2

  # code to execute if condition2 is true

elseif condition3

  # code to execute if condition3 is true

else

  # this line is reached if all 3 conditions fail

end