Switches Flashcards

1
Q

What is the primary use case for switches?

A

comparison of one value to multiple values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Does the default case have to be at the bottom of the switch statement?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens if there is no break statement between cases?

A

every code in each code block will be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly