dimanche 30 août 2015

How can I check if one value is A or B and another value is A or B?

I'm trying to do something to the effect of:

if (firstChoice == A || B && secondChoice == A || B){
    //passes check.
}

Logically, I want this to pass if the first and second choice are either A or B. Is this syntax valid? Is there a better way to do it?

Aucun commentaire:

Enregistrer un commentaire