Solved

Multiple values in  case evaluation of a switch statement

Posted on 2009-06-27
1
1,761 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

740 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