###Switch
This is horrible (change required)
- variant A
switch(type) {
case value:
break;
default:
break;
}
- variant B
switch(type) {
case value:
return ...;
default:
return ...;
}
- variant C (for scope based variables
const
,let
)
switch(type) {
case value: {
return ...
}
default: {
return ...
}
}