Can switch case be used within an if else statement? If so can someone please give an example with the proper syntax? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can switch case be used within an if else statement? If so can someone please give an example with the proper syntax?

17th Oct 2019, 6:44 AM
beastmaster64
beastmaster64 - avatar
2 Answers
+ 8
Yes it can. You can try it yourself on code playground.
17th Oct 2019, 7:46 AM
Sonic
Sonic - avatar
+ 2
What are you mean?
17th Oct 2019, 6:49 AM
id001x
id001x - avatar