I have two questions related to the code:
For my code should I have a break statement after each part of the if – else or just one at the end? Also when I define my object. Is it standard practice to be using uppercase for the fields such as Pk, Param, Table, Success?
case "Exam":
if (accountID) {
obj = {
pk: pk = accountID + "04000",
param: '?pk=' + accountID + "04000",
table: "Content",
success: true
};
// break here ?
} else {
paramOnFailure("Please reselect Account");
obj = {
success: false
};
// break here ?
}
// break here ?
1 Answer