Skip to main content

All Questions

3 votes
3 answers
791 views

Is there a way to have four possible outcomes without repeating the two conditions? [duplicate]

In a generic sense, my question goes something like this: if (p) { if (q) { a(); } else { b(); } } else { if (q) { c(); } else { d(); } } There ...
Kyle Delaney's user avatar