Multiple values in case evaluation of a switch statement

Am I able to evaluate multiple values in the case section of a switch statement
switch (country) {
        case '':
 
            break;
 
        case 'AL','DC':
 
            break;
 
        default :
 
            break;
    }

Open in new window

LVL 4
ruffoneAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ruffoneConnect With a Mentor Author Commented:
this solved my issue

switch (country) {
        case '':
 
            break;
 
        case 'AL':
        case 'DC':
 
            break;
 
        default :
 
            break;
    }

Open in new window

0
All Courses

From novice to tech pro — start learning today.