case
statements found JS-006411276 switch (e) {
11277 case "input":
11278 this.checked = this.defaultChecked;
11279 case "textarea":11280 return (this.value = this.defaultValue), !0;11281 case "option":
11282 case "optgroup":
11283 var r = t.parents("select");
11773 switch (e) {
11774 case "input":
11775 this.checked = this.defaultChecked;
11776 case "textarea":11777 return (this.value = this.defaultValue), !0;11778 case "option":
11779 case "optgroup":
11780 var r = t.parents("select");
11276 switch (e) {
11277 case "input":
11278 this.checked = this.defaultChecked;
11279 case "textarea":11280 return (this.value = this.defaultValue), !0;11281 case "option":
11282 case "optgroup":
11283 var r = t.parents("select");
11274 switch (e) {
11275 case "input":
11276 this.checked = this.defaultChecked;
11277 case "textarea":11278 return (this.value = this.defaultValue), !0;11279 case "option":
11280 case "optgroup":
11281 var r = t.parents("select");
11771 switch (e) {
11772 case "input":
11773 this.checked = this.defaultChecked;
11774 case "textarea":11775 return (this.value = this.defaultValue), !0;11776 case "option":
11777 case "optgroup":
11778 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();
}