I have this block of switch statements, which the control variable has type string. I compared the value of this variable with another string in an if statement, it works. But it doesn't work if I put it in a switch statement.
The code is below:
type = $('serType');
if (type == "Age"){
logger.info('Age'.toLowerCase());
}
switch (type){
case "TV":
columnHeader = "";
break;
case 'Age':
logger.info("i am in age case");
columnHeader = "'id', 'pat_name', 'pat_age' ";
break;
default:
logger.info("i am in default case");
break;
}