Use switch when comparing one value against many options:
let day = 3
switch (day) {
case 1:
console.log("Monday")
break
case 2:
console.log("Tuesday")
break
case 3:
console.log("Wednesday")
break
default:
console.log("Unknown day")
}
The break statement exits the switch. Without it, execution falls through to the next case.