I have the following:
switch (entity) {
case "Topic":
return {
pk: "0006000",
param: "?pk=0006000",
table: "Content",
success: true
};
break;
This is repeated any times with different entities. All are coded in the same way with a return statement and then a break.
When I run jslint it complains saying “break after return in case”. Is there a different way I should be coding this?
The break statement in this case would never hit as the values are being returned even before that..
You can safely remove the break;
But I feel returning it after storing it in a variable is a good practice