Each case needs break to prevent fall-through:
let fruit = "apple"
switch (fruit) {
case "apple":
console.log("Red or green")
// Missing break - falls through!
case "banana":
console.log("Yellow") // This runs too!
break
}
Forgetting break is a common bug. Every case should end with break or return unless you intentionally want fall-through.