Test Multiple Conditions With the || Operator4:04 with Guil Hernandez
There are times you'll want to perform an action if either of the two possible conditions is true. In this video, you'll use the logical OR (|| ) operator to test multiple conditions.
Try to keep your conditional statements short and precise. When conditionals become too long or complicated, they can be challenging to track and manage. In some circumstances, it may be unavoidable.
A good rule of thumb is: if you find yourself creating a lengthy and overly complicated conditional, it might be worth taking the time to work out a more explicit, alternative approach.
You need to sign up for Treehouse in order to download course files.Sign up