- 1

Why we can not convert some if statement into switch statement

if(a>=b) { //code to be executed }

28th Sep 2020, 2:59 AM
born2code
born2code - avatar
3 Respostas
+ 1
If you're statement is Logical use if statement, if it is multiple choices switch is the best choice.
28th Sep 2020, 3:18 AM
darkcris1
darkcris1 - avatar
0
if statement is conditional either it's true or false Switch has specific case and you cannot make a conditional on it
28th Sep 2020, 7:30 AM
darkcris1
darkcris1 - avatar
- 1
I dont understand yet please give me full description
28th Sep 2020, 6:40 AM
born2code
born2code - avatar