switches | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

switches

Can you do something like this? EXAMPLE switch (b) case 6 < b Yes I know thats not the right way to do a switch, its an example.

27th Feb 2017, 1:16 AM
DeleteThisAccount
2 Answers
+ 9
Nope, switch can only check for specific values. If you want to check ranges, use if/else.
27th Feb 2017, 2:38 AM
Tamra
Tamra - avatar
+ 5
no
27th Feb 2017, 1:33 AM
chris
chris - avatar