I have the following:
function getPk(entity) {
var store = window.localStorage;
switch (entity) {
case "City":
if (store.getItem('AccountID')) {
// Need to return both of the below pieces of information
return store.getItem('AccountID') + "04" + "000";
return "CityTable";
} else {
paramOnFailure("Please reselect");
return false;
}
break;
The problem is I need to be able to call this function and return two strings. Here I show two return statements but I know I cannot do that.
Is there a clean way I can return two strings to the function that calls my getPk(entity) function?
If possible can you give an example also of how I can read what is returned.