Combining Conditions
Learn to use the AND and OR operators in the if statements.
We'll cover the following...
We'll cover the following...
and and OR
We can combine conditions that go right after the if statement. Sometimes, we need to perform multiple checks:
if ...
puts ...
end
There are two ways of combining the conditions: AND and OR. Each way can be represented by the characters && (double ampersand) and || (double pipe).
Example
Explanation
It is important to note that we can also ...