case
statements found JS-006411265 switch (e) {
11266 case "input":
11267 this.checked = this.defaultChecked;
11268 case "textarea":11269 return (this.value = this.defaultValue), !0;11270 case "option":
11271 case "optgroup":
11272 var r = t.parents("select");
11762 switch (e) {
11763 case "input":
11764 this.checked = this.defaultChecked;
11765 case "textarea":11766 return (this.value = this.defaultValue), !0;11767 case "option":
11768 case "optgroup":
11769 var r = t.parents("select");
11265 switch (e) {
11266 case "input":
11267 this.checked = this.defaultChecked;
11268 case "textarea":11269 return (this.value = this.defaultValue), !0;11270 case "option":
11271 case "optgroup":
11272 var r = t.parents("select");
If the fallthrough is intentional in the code, there is no way to indicate this intent in the language.
It's considered a best practice to always indicate when a fallthrough is intentional using a comment which matches the /falls?\s?through/i
regular expression.
switch(foo) {
case 1: doSomething();
case 2: doSomethingElse();
}
switch(foo) {
case 1:
doSomething();
break;
case 2:
doSomethingElse();
}
function bar(foo) {
switch(foo) {
case 1:
doSomething();
return;
case 2:
doSomething();
}
}
switch(foo) {
case 1:
doSomething();
throw new Error("Boo!");
case 2:
doSomething();
}
switch(foo) {
case 1:
case 2:
doSomething();
}
switch(foo) {
case 1:
doSomething();
// falls through
case 2:
doSomething();
}