Using Classes
Loops in Ruby are used to execute the same block of code a specified number of times.
Ruby while Statement:
Syntax:
while conditional [do]
code
end
The conditional statements if and unless can also use expressions that return an object that is not either true or false.
In such cases, the objects false and nil equates to false.