-1

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?

Peter David Carter
  • 2,548
  • 8
  • 25
  • 44

1 Answers1

2

Use the || operator. It's much like && but represents "OR" rather than "AND"

sourdoughdetzel
  • 664
  • 3
  • 6