0

what is switch used for!?

12th Oct 2016, 8:59 AM
zhilan
zhilan - avatar
5 Answers
+ 3
I agree with @Mark. its substitute. you can use it for example for menu, check chooses or function with keypress, keyup, keydown.
12th Oct 2016, 4:19 PM
Kaziu (Mark K.)
Kaziu (Mark K.) - avatar
+ 2
Switch statements are just substitute for "if" statements.
12th Oct 2016, 10:37 AM
Mark Ian Pamintuan
Mark Ian Pamintuan - avatar
+ 2
can be used as an alternative for the if else if else statements
12th Oct 2016, 11:20 AM
EMMANUEL NUOTAH TUONUO DERY
EMMANUEL NUOTAH TUONUO DERY - avatar
+ 1
switch are same as if else statements but are faster
13th Oct 2016, 1:48 PM
Abhinav Dhiman
Abhinav Dhiman - avatar
0
It is more convenient to use cycle
19th Oct 2016, 2:34 PM
Eduardo Espinosa
Eduardo Espinosa - avatar