Statements and declarations
default clause
Optional switch clause selected when no case matches. It can occur before or after other cases, and its body can also be reached by fallthrough. Only one default is allowed.
Formal Syntax & Structure
javascript syntaxjavascript
default: statementsWorking Example
Example Snippetjavascript
switch (9) { case 1: break; default: console.log("other"); }