Solved

Multiple values in  case evaluation of a switch statement

Posted on 2009-06-27
1
1,758 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generate Numbers in JQuery file 11 72
forgetful about js objects 8 54
jquery tab header text 1 27
jQuery on click requires double click 6 28
Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
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…

713 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