01 / 04
No match means it walks straight past
When no case matches, a switch finishes without doing anything. There is no error either, so it is easy to miss that nothing happened.
Below, blue is on no case, so the signal message goes missing entirely.
const signal = "blue";switch (signal) { case "green": console.log("go"); break; case "red": console.log("stop"); break;}console.log("check done");Result
check done