Switch Statement Quiz
Multiple Choice Medium
Question
What happens if you forget a `break` in a switch case?
Hint
switch cases fall through without break.
Explanation
Without a break statement, execution 'falls through' to the next case — all subsequent cases execute until a break is encountered or the switch ends. This is sometimes intentional (grouping cases), but usually a bug. Always add break (or return) to each case unless fall-through is deliberate.
Related Resources
Related Lessons
- Conditions
Learn about switch statements.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.