javascript switch statement multiple cases
//javascript multiple case switch statement
var color = "yellow";
var darkOrLight="";
switch(color) {
case "yellow":case "pink":case "orange":
darkOrLight = "Light";
break;
case "blue":case "purple":case "brown":
darkOrLight = "Dark";
break;
default:
darkOrLight = "Unknown";
}
//darkOrLight="Light"switch (varName)
{
case "afshin":
case "saeed":
case "larry":
alert('Hey');
break;
default:
alert('Default case');
}
Also in JavaScript:
- jqgrid aftershowform
- ready function javascript
- how to use flatlist keyextractor
- js null is object typeof
- d3js circle out of scrren
- nodejs include json file
- how to use the match function in javascript for regex
- react redirect to url
- remove duplicates from array of objects javascript
- simple json data
- react chunk file too large
- what is code.jquery integrity crossorigin
- face-api.js
- empty array js
- launch.json vscode electron
- remove all spaces from a string javascript
- petition the lord with prayer
- javascript detect time on page
- angular generat model
- nativescript vue get native from ref
- tinymce menubar hide
- axios js and react
- how do i backspace from javascript calculator
- destruction in javascript