Ads by ProfitSence
Close

JavaScript Switch Statement Multiple Cases

Last Updated on Wednesday 5th Oct 2022

javascript switch multiple case

multiple cases in switch statement in JavaScript,

  • Use the fall-through feature of the switch statement
  • A matched case will run until a break is found

case javascript

			
					switch (name)
{
   case "AB":
   case "BC":
   case "CD":
       alert('HEY YOU');
       break;

   default:
       alert('Default HII');
}