Solved

Multiple values in  case evaluation of a switch statement

Posted on 2009-06-27
1
1,742 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:ruffone
1 Comment
 
LVL 4

Accepted Solution

by:
ruffone earned 0 total points
ID: 24728847
this solved my issue

switch (country) {

        case '':

 

            break;

 

        case 'AL':

        case 'DC':

 

            break;

 

        default :

 

            break;

    }

Open in new window

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now