And/or
It is possible to check more than one condition at the same time. You just chain them together, with the words "and" and "or". Example:
if ((the hit ship only had one field left) and (there was only one ship left)) appoint a winner if ((this field belongs to player A) or (this field belongs to player B)) there shouldn't be water here
Concept last updated: 24/09 2003.
Relations
|
Other sources
- Eksempler på programmerings-sprog - Og/eller
- Start på Javascript 1.5; Jes Nyhus; 1.udgave (obl.) - 6. Betingede sætninger - Logiske operatorer