Could you add in case in switch a logical statemnt as condition? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Could you add in case in switch a logical statemnt as condition?

I mean in switch, while you're making condition in your case, could you use logical statement as your condition, made in brackets.

9th Nov 2019, 11:04 PM
Patrick Daniel Parafińczuk
Patrick Daniel Parafińczuk - avatar
1 Answer
+ 1
I mean solution 2. Thanks for explaning ☺
9th Nov 2019, 11:35 PM
Patrick Daniel Parafińczuk
Patrick Daniel Parafińczuk - avatar