ruby unless if code example
Example 1: ruby unless
unless number.even?
# runs if `number` is NOT even
else
# runs if `number` is even
end
Example 2: ruby if statement
if condition
expression
unless number.even?
# runs if `number` is NOT even
else
# runs if `number` is even
end
if condition
expression