In JavaScript, I am trying to write a switch statement that does something like the following -
swtich(n)
{
   case 1:
      functionW(); functionX(); functionY(); functionZ();
      break;
   case 2:
      functionX(); functionY(); functionZ();
      break;
   case 3:
      functionY(); functionZ();
      break;
   default:
      functionZ();
      break;
}
Is there a better way to do this?
 
     
     
    