0

Is there an easy way to write nest statements in if statement

if it please tell me

6th Apr 2018, 7:30 AM
Sahil Chauhan
Sahil Chauhan - avatar
1 Odpowiedź
0
Some languages allow you to use switch so you'd write: switch(i) { case 1: .... break; case 2: .... break; .... } instead of nested if statements: if (i == 1) { .... } else if (i == 2) { ... } else if ....
6th Apr 2018, 8:14 AM
Aaron Eberhardt
Aaron Eberhardt - avatar