I was wondering if there was a way I could make an if statement with multiple 'true' conditions, for example, if cat="red" or cat="blue" then it would run and proceed. I know you can do && but that requires both things to be true, and I am looking more for an either or. Anyone know what I could use?
Asked
Active
Viewed 189 times
-1
Peter David Carter
- 2,548
- 8
- 25
- 44
DangerMouse5
- 35
- 7
1 Answers
2
Use the || operator. It's much like && but represents "OR" rather than "AND"
sourdoughdetzel
- 664
- 3
- 6
-
Do you have a link to some official documentation? – Adriano Nov 28 '18 at 23:59